yiminzme / Multi-Highlight

Chrome/Edge Extension: Multi Highlight - Efficiently and flexibly highlight your online reading
https://chrome.google.com/webstore/detail/multi-highlight-preview/dofiimcmnmincloafjcfnjpdfefgmfic
GNU General Public License v3.0
123 stars 32 forks source link

[Bug] Text in <input>, <textarea> should not be altered #55

Open KSR-Yasuda opened 2 years ago

KSR-Yasuda commented 2 years ago

Describe the bug

In specific cases, it unexpectedly removes highlight-targeted words in textarea.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a Redmine ticket
  2. In a ticket, edit a note (Click ✎ mark of each note)
  3. It shows a textarea to edit the note; but highlight-targeted words are vanished

Expected behavior

Highlight-targeted words are not removed from textarea or such.

Additional context

Probably, it tries to highlight words in <textarea>, replacing with <span> element. However, <textarea> cannot have any <span> element; and browser would come to drop such invalid element.

I think HTML elements such as <input> and <textarea> should be untargeted of this plugin.

yiminzme commented 2 years ago

Good suggestion, will fix this in the future.

yiminzme commented 1 year ago

Anyone find more examples of similar issue? I cannot reproduce it as there is no ✎ mark in my version of https://my.redmine.jp/demo/

yiminzme commented 1 year ago

From user:

Problem: when I tried to enter words in text box of watsapp web, the words are getting deleted/erased. I figured out that when Auto-Rehighligh is checked, this problem occurs. If the Auto-Rehighligh is unchecked, then watsapp web text box is working normal. for eg. the words entered in multihightlight are ice gelato. when i try to type ice in chat box of watsapp web, its deleting automatically. If i try to type office, only "off" showing "ice" is deleting automatically. Dunno wats the issue? Can anyone help me with this? Note: I tried by clearing cache, cookies also. still the problem exists.

ai2c commented 1 year ago

I usually need to use this plugin on an internal website (mainly using Vue), but what troubles me is that it cannot mark the textarea text in the input. Can you add an option to allow marking so that users can choose for themselves? Thanks♪(・ω・)ノ

locofocos commented 2 months ago

I run into this with Slack. If I configure this extension to highlight `` and type "" into a Slack message, it will disappear. The letters "asd" show up, but then when I press "f", the entire string is removed from the message.

In this case, it's not an <input> nor a <textarea>, but just a div (probably some React element or similar).