question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] "text-change" event not emitted properly

See original GitHub issue

I’m using vue3-quill as a wrapper around quill editor for my vue3 application.

Out of the blue, the component stopped emitting an event when the text content of quill editor changes. Inspecting the code of vue3-quill, I noticed the problem is that the inner instance of quill isn’t emitting the text-change event.

The event is however emitted correctly when one of the following keys are pressed: enter, space, delete. Other keys don’t trigger the event.

I made this repo to reproduce the error. You can just npm run serve it and try and type something in the editor. You’ll see the text isn’t displayed below, but if you type enter, space, or delete, you’ll see the text correctly updated.

I’ll add that this started happening today, or at least went unnoticed by my team and me until now. What’s going on?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
luincommented, Sep 10, 2022

Thanks for the updates! After a bit of hard debugging, I found a way to reproduce it 100%. However, this issue only triggers when devtools is open, so I’m not quite sure if this is the problem you were having. Any feedbacks are welcome!

To reproduce:

  1. Open a page that contains a Quill instance.
  2. Open devtools and set a breakpoint to the callback function of parchment/scroll.ts’s mutation observer.
  3. Type a char to trigger the breakpoint.
  4. Refresh the page.

From now on, any mutation observers won’t work on this tab, even if you do hard refreshes. Only opening a new tab solves the issue.

Screencast (using the repo provided by @samul-1):

https://user-images.githubusercontent.com/635902/189476545-649c4921-097b-47b8-a150-bff08a29b08a.mp4

Obviously, this is a bug on Chrome side and it was only introduced in recent Chrome versions. So there are nothing we can do on Quill side.

1reaction
cleverplatypuscommented, Sep 12, 2022

Thanks. It definitely seems that debugging it … breaks it 😃

Oh, the fun.

Read more comments on GitHub >

github_iconTop Results From Across the Web

selection-change event not consistently emitted #1661 - GitHub
Steps for Reproduction. Visit this codepen; Observe the text blured; Focus the editor; Observe the text change to focused; Click outside of ...
Read more >
c# - text changed event not fired - Stack Overflow
To have the TextChanged event cause an immediate posting, set the TextBox control's AutoPostBack property to true. Share.
Read more >
QLineEdit emits "editingFinished()" signal twice when the text ...
@mrjj said in Potential Bug (Qt 5.15): QLineEdit emits "editingFinished()" signal twice when the text is changed and enter is pressed:.
Read more >
TypeScript with Composition API - Vue.js
When not using <script setup> , defineComponent() is able to infer the allowed events for the emit function exposed on the setup context:....
Read more >
TextChange Event is Not Calling - MSDN - Microsoft
My problem is that "TextChange " Event is not calling when Text is changed in this way. If i manually change the text...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found