-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Field editor triggered by drag from flyout on touch devices #277
Comments
We think the current behavior in Blockly doesn't make sense in touch or in mouse... Instead, the field editor should only open when tapped. When you drag on the field editor, it should either create a new block or scroll the flyout, just like dragging on a block. This would be more consistent with how fields behave in the workspace itself. |
(Note: I've moved this comment across as I originally posted it on the wrong issue) I've looked further into this, and found out two things.
I've put together a patch that allows the blocks to be dragged by the fields. However, I needed to differentiate between clicks and drags on the fields, and the cleanest way to do this was to make the behaviour in closeable flyouts the same as in fixed flyouts:
@tmickel, would these changes be undesirable? Alternatively, we could just add a check in touchend that makes sure the touch is over the element (related Stack Overflow question). |
…ton-position fix scratchfoundation#108 add button is not centered in firefox
If you touch the field of a block in the flyout, then try to drag it, it will open the editor after your drag completes. On a desktop browser, this does nothing.
dragging on Chrome on Nexus 9, a916f82
I've not looked in to the cause of this. I guess it's to do with touchstart/end being handled differently to mouseup/down.
While the editor clearly shouldn't be opened in this case, do you think the block should be draggable by its field? Blocks are draggable by their fields when they're in the workspace. Upstream Blockly has the same behaviour (allows it in the workspace, doesn't in the flyout).
The text was updated successfully, but these errors were encountered: