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

Added support for isContentEditable #234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

skygate2012
Copy link
Contributor

@skygate2012 skygate2012 commented Mar 25, 2022

Some webpages (YouTube comments for example) use <div> as text input so isContentEditable needs be checked in addition.

Relevant minor changes:

  • Allowed double click to trigger popup in text input elements since it won't interfere with text editing like hotkeys do.
  • Added a mouse point save before getTranslation() to avoid the triggered popup displaying in somewhere else when the network is slow and the mouse is moved.
  • Added condition for the timeout to prevent triggering onSelectionEnd if there's no text selected.

Some webpages (Youtube comments for example) use <div> as text input so isContentEditable needs be checked in addition.

Relevant minor changes:
- Allowed double click to trigger popup in text input elements since it won't interfere with text editing like hotkeys do.
- Added a mouse point save before getTranslation() to avoid the triggered popup displaying in somewhere else when the network is slow and the mouse is moved.
- Rectified `exitKey` not being verified (my bad).
- Added condition for the timeout to prevent triggering `onSelectionEnd` if there's no text selected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant