You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@BeksOmega pointed out that a better solution would be to restructure paste to not access the clipboard contents directly. It could instead call Blockly.paste or similar.
I think the best thing to do here is probably to modify paste in core to return the block if pasting worked (instead of true). Then we would be able to easily insert the pasted block where desired.
Sadly changing the return type of paste would be a breaking change (but I don't think many people would be affected).
Otherwise. we could create public accessors, but long-term I don't think this is a great idea. Firstly, it increases the size of Blockly's API, which is ehhhh. And secondly, it means we'll have to keep maintaining and updating keyboard nav's paste as the paste in core changes.
Category
Component
keyboard-navigation
Describe the bug
The
paste
function directly accessesBlockly.clipboardXml_
,Blockly.clipboardSource_
, andBlockly.clipboardTypeCounts_
.These were always supposed to be private, and will disappear in the next Blockly release because of the changes in google/blockly#5237
To Fix
Blockly.getClipboardInfo
to get an object containing the xml, source, and type counts.The text was updated successfully, but these errors were encountered: