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

Refactor touch scan behavior #1442

Merged
merged 13 commits into from
Oct 5, 2024

Conversation

khaitruong922
Copy link

@khaitruong922 khaitruong922 commented Sep 24, 2024

Fixes #1433

Changes:

  • Remove scanAltText option, default to not scan alt text on touch event.
  • Not scan on input and textarea on touch event.

I don't know if there is any use case of scanning alt text, hyperlink or input on mobile or touch screen. If this is not intended behavior then we can disable them on touch event.
Making this behavior a setting such as scanInteractiveElements is not a really good idea because touch-screen laptops exist and users need to take extra step in settings to disable/enable them.

@khaitruong922 khaitruong922 marked this pull request as ready for review September 24, 2024 08:16
@khaitruong922 khaitruong922 requested a review from a team as a code owner September 24, 2024 08:16
Copy link

github-actions bot commented Sep 24, 2024

⚠️ Visual differences introduced by this PR; please validate if they are desirable.

View Playwright Report (note: open the "playwright-report" artifact)

@khaitruong922
Copy link
Author

khaitruong922 commented Sep 25, 2024

There are probably some cases where the user wants to Yomitan as they are typing. Will scan input field if the tap does not change caret position.

@jamesmaa jamesmaa added this pull request to the merge queue Oct 5, 2024
Merged via the queue into yomidevs:master with commit f8054fb Oct 5, 2024
12 checks passed
@Kuuuube Kuuuube added kind/enhancement The issue or PR is a new feature or request area/ui-ux The issue or PR is related to UI/UX/Design labels Oct 6, 2024
austinyu12 pushed a commit to austinyu12/yomitan that referenced this pull request Oct 22, 2024
* Remove scanAltText, exclude selector based on pointer event

* input and textarea don't work

* Update text-scanner.js

* Prevent touch scan on input or text area

* Update text-source-range.js

* lint

* Prevent exclude .tag and .gloss-link from website

* exclude inflection

* lint

* lint

* refactor

* allow scan input text when tapping on same position

* allow scan hyperlink on tap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-ux The issue or PR is related to UI/UX/Design kind/enhancement The issue or PR is a new feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to disable scan on input field
3 participants