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

Non printable keys like volume up remove the content #3113

Closed
mlewand opened this issue Feb 14, 2018 · 7 comments · Fixed by ckeditor/ckeditor5-typing#172
Closed

Non printable keys like volume up remove the content #3113

mlewand opened this issue Feb 14, 2018 · 7 comments · Fixed by ckeditor/ckeditor5-typing#172
Assignees
Labels
package:typing type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@mlewand
Copy link
Contributor

mlewand commented Feb 14, 2018

Are you reporting a feature request or a bug?

Bug

Provide detailed reproduction steps (if any)

  1. Open CKEditor 5 instance with typing plugin, e.g. classic editor demo.
  2. Select some text.
  3. Use volume up button.

Expected result

Text is not removed.

Actual result

Text is removed.

nonprintablekeys

Other details

Other examples keys like:

  • Menu key
  • Play/Pause, Rewind (other media buttons)
  • Insert Key
  • Num lock

  • Browser: All
  • OS: Win10
@jodator
Copy link
Contributor

jodator commented Feb 14, 2018

I can confirm the same issue on Linux Mint 18.3 Cinnamon, browsers checked: Chrome & Firefox.

For me, the buttons that causes the bug are:

  • menu
  • home
  • scroll lock
  • pause/break
  • num lock
  • enable/disable touchpad
  • enable/disable monitor backlight

Buttons that do not cause the bug:

  • media buttons (play, volume +/-, mute)
  • email
  • calculator
  • print screen
  • brightness up/down
  • keyboard brightness up/down

@Reinmar
Copy link
Member

Reinmar commented Feb 14, 2018

We need to hardcode so-called "safe keys", unfortunately. You can find them in https://github.com/ckeditor/ckeditor5-typing/blob/a02eab5f73bf2c0288a7149b34424c1badbc380a/src/input.js#L312-L328 and this list isn't complete yet. Actually, I don't think that it ever will be, but fortunately, it's not a critical problem.

@Reinmar
Copy link
Member

Reinmar commented Apr 10, 2018

A DUP with some more keys reported in #955.

@pomek
Copy link
Member

pomek commented Oct 16, 2018

Referring to #955 - Windows key does not change anything in the editor. It even isn't caught by the observer.

@Reinmar
Copy link
Member

Reinmar commented Oct 25, 2018

Referring to ckeditor/ckeditor5#955 - Windows key does not change anything in the editor. It even isn't caught by the observer.

Are you sure this is true on all browsers on all platforms?

@pomek
Copy link
Member

pomek commented Oct 25, 2018

No. I don't remember do I check it on Edge (Win 10).

@Reinmar
Copy link
Member

Reinmar commented Oct 25, 2018

Because we can easily add the win key and other keys we know are safe to the "safe keys" object and just be future proof. Assuming anything here would have to be backed by serious proofs. Especially that issue like the one with the win key were already reported.

Reinmar referenced this issue in ckeditor/ckeditor5-typing Oct 31, 2018
Fix: Non-printable keys like volume up or the win key will not remove the content anymore. Closes #136.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-typing Oct 9, 2019
@mlewand mlewand added this to the iteration 21 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:typing labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:typing type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants