google / blockly-android

Blockly for Android
Apache License 2.0
671 stars 209 forks source link

Dragging block onto its own TextField within an Fragment workspace will paste the Intent. #691

Open RoboErikG opened 6 years ago

RoboErikG commented 6 years ago

There's a bug in the drag and drop implementation that can cause the XML serialization of a block to get pasted into a text field on the block the first time you drag it.

Reported on the mailing list.

AnmAtAnm commented 6 years ago

I can recreate it the Simple Fragment demo, but I can't recreate it in the Simple Activity demo.

It only occurs when a block is dropped onto itself. Attempting to drag a text block onto another text block does not cause this problem. This isn't possible in the Simple Activity demo because the blocks are GONE during dragging (only the DragShadow is present). I'm not sure why the block in the Fragment demo isn't gone, too.