Added support for isContentEditable#234
Conversation
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.
|
@ninja33 Hi, can you review this? These are small but critical fixes. I have been using my custom fork because of this one change. More and more websites/apps are using custom elements (some even web components) with |
upon some users feedback, when selected text in editable area, the extension will crash. so in the very early version, I just simply disabled it. if you are fully tested this case without issue, I am OK. btw, because it's PR before 3 years, please help submit a new PR upon branch manifest-v3 |
Some webpages (YouTube comments for example) use
<div>as text input soisContentEditableneeds be checked in addition.Relevant minor changes:
getTranslation()to avoid the triggered popup displaying in somewhere else when the network is slow and the mouse is moved.onSelectionEndif there's no text selected.