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

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

Open
KSR-Yasuda opened this issue Aug 15, 2022 · 5 comments
Open

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

KSR-Yasuda opened this issue Aug 15, 2022 · 5 comments
Labels
good first issue Good for newcomers

Comments

@KSR-Yasuda
Copy link

Describe the bug

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

  • Multi Highlight: v2.9.0

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
Copy link
Owner

Good suggestion, will fix this in the future.

@yiminzme yiminzme changed the title [Bug] Words in textarea disappears [Bug] Text in <input>, <textarea> should not be altered Sep 19, 2022
@yiminzme yiminzme added the good first issue Good for newcomers label Sep 19, 2022
@yiminzme
Copy link
Owner

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
Copy link
Owner

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
Copy link

ai2c commented Apr 19, 2023

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
Copy link

locofocos commented Jun 26, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants