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

Spamming Backspace and then holding Down CTRL/⌘-A causes an uncaught TypeError #256

Closed
cwhitwell opened this issue Mar 17, 2020 · 0 comments
Labels
Milestone

Comments

@cwhitwell
Copy link

Hi there,
I've been running some tests on the SunEditor as I will be using it in my web application. First of all big props as it works really well :). I have however found some bugs and will raise a separate issue for each.

This bug is caused when you spam (press repetitively) or hold down the Backspace key, then press CTRL/⌘ + A (select all shortcut). Once this error occurs it can break other aspects of the editor such as changing font. I was able to work around this issue by blocking the backspace (keyCode=8) and delete (keyCode=46) keyDown event when the editor is empty. I suspect the real fix will be similar to this.

Error message in console:
core.js:3329 Uncaught TypeError: Cannot read property 'textContent' of null

Environment:
MacOS Mojave V10.14
Google Chrome Version 80.0.3987.132 (Official Build) (64-bit)
suneditor V2.26.0

Please see video demo attached (I've added an application to display my keystrokes on the screen).
Spam Backspace CTRL A bug.mov.zip

@JiHong88 JiHong88 added the bug label Mar 17, 2020
@JiHong88 JiHong88 added this to the 2.27.0 milestone Mar 17, 2020
JiHong88 added a commit that referenced this issue Mar 18, 2020
fix: #256 holding key
modify: #258 submenuOff when keydown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants