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

[Bug]: Non-iOS Touch Devices exhibit "click through" from sp-action-menu #4270

Open
1 task done
croberts5 opened this issue Apr 15, 2024 · 3 comments
Open
1 task done
Labels
Android Browser: Chrome bug Something isn't working Component: Action Menu duplicate This issue or pull request already exists firefox Use this label on pull requests to perf benchmark in Firefox Needs repro triage An issue needing triage

Comments

@croberts5
Copy link

Code of conduct

  • I agree to follow this project's code of conduct.

Impacted component(s)

sp-action-menu

Expected behavior

On selecting an option from the menu, that event should not apply/propagate to other elements in the DOM.

Actual behavior

If an action menu item is positioned directly on top of some other element with a click handler (like a button), on selecting that menu item, the menu will close (expected) and the item beneath it will be targeted for a click event.

This occurs in all non-iOS touch devices -- small phone devices and tablets alike (so both sp-tray and popover).
Verified an issue in mobile emulators in Chrome and Firefox.
Verified with real devices running Android and Chrome via Browser Stack
Verified with a physical device running Android and Chrome (Samsung Galaxy S22)

Screenshots

SWC only sandbox in Chrome, emulating an iPhone SE window size:

chrome_iphone.mov

SWC only sandbox in Firefox, emulating an iPad:

ipad_firefox.mov

What browsers are you seeing the problem in?

Firefox, Chrome

How can we reproduce this issue?

Here are some code sandboxes to reproduce the issue.
NOTE: this is a bit inconsistent -- in Chrome the issue only happens on the first load. Subsequent refreshes of the same tab didn't yield the console.log/problem. In Firefox, it happened every time. A different engineer had the opposite happen where it didn't have the first time in Chrome, but after subsequent refreshes it happen.

I suggest opening dev tools and changing the dimensions to match an iPhone SE to have the elements overlay as intended.

Pure SWC/lit component sandbox:
https://studio.webcomponents.dev/preview/oEUer0gOM1bd0Xar06jD/src?busid=10aeadb0-fb51-11ee-8db7-c3e82e8ed087

Sandbox where SWCs are rendered in a React environment:
https://9p9grt-5173.csb.app/

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

@croberts5 croberts5 added bug Something isn't working triage An issue needing triage labels Apr 15, 2024
@TarunAdobe
Copy link
Contributor

Hello @croberts5 I tried testing your demo on my chrome, safari and firefox and I am unable to reproduce the bug. Can you please share your browser versions to help investigate further.

@croberts5
Copy link
Author

croberts5 commented Apr 19, 2024

macOS 14.1.
Chrome version 123.0.6312.122 (Official Build) (arm64)
Firefox 124.0.2 (64-bit)

Issue not present in Safari. Thanks!

I'd also suggest testing using an Android mobile device running Chrome. Consistently reproducible on Galaxy devices (via Browser Stack)

@Westbrook
Copy link
Collaborator

Seems like a duplicate of #4227.

@najikahalsema najikahalsema added Needs repro duplicate This issue or pull request already exists Android Component: Action Menu Browser: Chrome firefox Use this label on pull requests to perf benchmark in Firefox labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Browser: Chrome bug Something isn't working Component: Action Menu duplicate This issue or pull request already exists firefox Use this label on pull requests to perf benchmark in Firefox Needs repro triage An issue needing triage
Projects
None yet
Development

No branches or pull requests

4 participants