Closed FiloSpaTeam closed 6 years ago
I'm running into the same exact issue. This also happens if you have just one word in the input and you use Ctrl+Backspace/Ctrl+Delete to delete it. Also change events stop for a bit (200ms to be precise) if you are typing and just press the Ctrl key.
I dug through the code and I can shed some light on this issue. I don't have a good solution but it may help @Alex-D find/address the issue. There is a variable that tracks when the Ctrl key is pressed. It's set to true here. There is then a 200ms timer set here to reset it to false, but that timer is only fired when there some input/change happens (which it does not on Ctrl+A for example). Then here is the check that prevents the change event from firing when the Ctrl key is pressed down. I'm not sure about the original intention of this code, hence why I'm not offering any solutions now
edit: updated links
This issue stems from fix applied in https://github.com/Alex-D/Trumbowyg/issues/311 which could not be reproduced back then. If possible I say get rid of the debounce, or at the very least make it optional via trumbowyg config.
Having this issue as well.
Hey @vetruvet I think those links might have moved around on you since they are not pegged to a specific commit -- can you run through what you figured out again?
@Meekohi good catch - updated the links to point to what is the latest commit on the develop branch as of now.
Another way this bug manifests: if you press and release Ctrl
then type a letter -- this also does not trigger tbwchange
.
Added a pull request that should fix this. I might be misunderstanding the intent of the ctrl
variable here, but I assume it should "reset" once someone is no longer holding down that key.
This should be fixed by @Meekohi's fix :)
Before report an issue, be sure to put these informations. Thanks :)
Informations
Browser + version: Chromium - 58.0.3029.110 Fedora Project (64-bit) OS: Fedora 25 64bit Resolution: Monitor?
How to reproduce the bug?
If you write content into textarea (with trumbowyg) and later you try to delete with Ctrl + A (select all) and Delete and you click out, no change event is propagated.