Skip to content

Fix BaseButton popup unresponsive on touchscreen after first tap - #118542

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
shiena:fix/118517
Apr 15, 2026
Merged

Fix BaseButton popup unresponsive on touchscreen after first tap#118542
akien-mga merged 1 commit into
godotengine:masterfrom
shiena:fix/118517

Conversation

@shiena

@shiena shiena commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #118517.

Regression from #110893.

On mobile browsers (e.g. iOS Safari), a tap delivers both touch and mouse events, and a popup opened from the
button becomes modal before the matching touch release is dispatched. The release is consumed by the popup,
leaving status.touch_index set so later taps are dropped as non-matching indices. Also only update
status.device_id while no touch interaction is active, so the originating device keeps ownership until its
release is processed.

@Alex2782

Copy link
Copy Markdown
Member
Reproducible: iPhone (iOS Safari)
Not reproducible: Android Chrome, desktop Chrome

I have no way to test on iOS. However, I believe I've found another issue, starting around the 5-second mark, which occurs repeatedly whenever the OptionButton loses focus.

Or is this issue identical to the one on iOS? It's also reproducible in the Android template and, as shown in the video, with the web template (Android, Google Chrome).

test.mp4

@Alex2782 Alex2782 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on:

  • MacOS (+ Web: Safari and Google Chrome)
  • Android (+Web: Google Chrome)

https://alex2782.github.io/multitouch/master/
https://alex2782.github.io/multitouch/PR_118542/


Test project: multitouch.zip

I extended MRP, added three buttons, and linked them with GdScript (down/up/pressed), the behavior is identical. master branch und this PR, multitouch down/ up events don't work, only with a maximum of 1 button at a time.
--> I created an issue report: #118581

If there are more critical regressions, then reverting PR #110893 would also be an option. This PR at least fixes the issue shown in the video above.

@shiena

shiena commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

I recorded videos on iOS Safari comparing master and this PR using the MRP.

@bruvzg
bruvzg self-requested a review April 15, 2026 07:33

@bruvzg bruvzg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://alex2782.github.io/multitouch/master/
https://alex2782.github.io/multitouch/PR_118542/

Tested using these links in Safari on iPadOS 26.4. I can reproduce the issue, and it seems to be fixed.

@akien-mga
akien-mga merged commit 60c2e1e into godotengine:master Apr 15, 2026
20 checks passed
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@shiena
shiena deleted the fix/118517 branch April 15, 2026 10:49
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Fix BaseButton popup unresponsive on touchscreen after first tap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OptionButton popup stops responding after first tap on iOS Safari

4 participants