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

fix(components): fix iOS select click event listening #16393

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

raphaelbernhart
Copy link

@raphaelbernhart raphaelbernhart commented Apr 4, 2024

Problem / fix

iOS Safari does not handle click events when a mouseenter event is registered and a DOM-change happens in a child.
We use a Vue custom event binding to only register the event on non-iOS devices.

The inputHovering state gets updated now on iOS-devices on click. This is needed as the mouseenter event normally does this.

Apple Developer Documentation: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
Vue Issue: vuejs/vue#9859

Here are some test-case recordings

Before changes

Screen.Recording.2024-04-04.at.11.07.08.mov

After changes

Screen.Recording.2024-04-04.at.11.09.15.mov

closed #5210

iOS Safari does not handle click events when a mouseenter event is registered and a DOM-change
happens in a child. We use a Vue custom event binding to only register the event on non-iOS devices.
The inputHovering state gets updated now on iOS-devices on click. This is needed as the mouseenter
event normally does this.

closed element-plus#5210
Copy link

👋 @raphaelbernhart, seems like this is your first time contribution to element-plus.

  • Please make sure that you have read our guidelines and code of conduct before making a contribution.
  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@pull-request-triage pull-request-triage bot added 1st contribution Their very first contribution Needs Review labels Apr 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

Copy link

github-actions bot commented Apr 4, 2024

Hello @raphaelbernhart, thank you for contributing to element-plus, please see our guideline to see how to make contribution

Copy link

github-actions bot commented Apr 4, 2024

🧪 Playground Preview: https://element-plus.run/?pr=16393
Please comment the example via this playground if needed.

@btea
Copy link
Collaborator

btea commented Apr 5, 2024

@kooriookami @tolking Do you have relevant device verification?

@kooriookami
Copy link
Member

@kooriookami @tolking Do you have relevant device verification?

No, I have no IOS device.

@btea btea requested a review from a team April 7, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] El-Input with clearable attribute had text need click twice to open keyboard on iOS Safari
3 participants