Skip to content
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

Bitmap field editor freezes after one click on mobile devices #2463

Open
1 task
mikeharv opened this issue Oct 7, 2024 · 4 comments
Open
1 task

Bitmap field editor freezes after one click on mobile devices #2463

mikeharv opened this issue Oct 7, 2024 · 4 comments
Labels
category: plugin Anything in the plugins folder type: bug Something isn't working

Comments

@mikeharv
Copy link
Contributor

mikeharv commented Oct 7, 2024

Check for duplicates

  • I have searched for similar issues before opening a new one.

Component

field-bitmap

Description

Our users have reported that the bitmap field editor stops working after one click on iPad. We have repro'ed on iPhone and also in the macOS Simulator of an iPad.

Reproduction steps

  1. Using a mobile device or simulator, go to https://google.github.io/blockly-samples/plugins/field-bitmap/test/index.html
  2. Open any bitmap field and toggle any pixel in the bitmap editor.
  3. Observe how the field editor and workspace are no longer responsive. However, the "random" and "clear" options still work.

Stack trace

No errors

Screenshots

No response

@mikeharv mikeharv added triage type: bug Something isn't working labels Oct 7, 2024
@mikeharv
Copy link
Contributor Author

@cpcallen Any ideas about this one?

So far, we've spent a bunch of hours looking into potential fixes, but nothing has seemed to help. It seems like the problem stems from handling mouse events only, but even switching to pointer events everything is still locked up.

@mikeharv
Copy link
Contributor Author

@cpcallen As an update, I managed to get this fixed for us here: #2372

In order to fix this in the plugin, I think we can consider three steps:

  1. Switch from conditionalBind to bind inside this.bindEvent() (as the former seems to be the culprit prevent further workspace events)
  2. Bind 'pointermove' events to the dropdown editor. Use document.elementFromPoint() to find the pixel button under the pointer, and read some new metadata on that element to determine which pixel to potentially toggle.
  3. Switch from mouse events to pointer events inside this.dropdownCreate().

These changes are explained in greater detail. at the PR linked above. However, you'll note that I had to add these changes to this.showEditor_() as this.dropdownCreate() is private.

@cpcallen
Copy link
Contributor

Hey, @btw17: are you able to have a look at this?

@cpcallen cpcallen added category: plugin Anything in the plugins folder and removed triage labels Oct 11, 2024
@btw17
Copy link
Member

btw17 commented Oct 11, 2024

Hey @cpcallen - potentially in a few weeks. About to be OOO. If this can wait, I can add it to my TODO list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: plugin Anything in the plugins folder type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants