Opened 11 years ago

Closed 10 years ago

#10911 closed Bug (fixed)

Widgets: Keyboard events prevention while focused

Reported by: Marek Lewandowski Owned by: Marek Lewandowski
Priority: Normal Milestone: CKEditor 4.3
Component: UI : Widgets Version: 4.3 Beta
Keywords: Cc:

Description (last modified by Marek Lewandowski)

Widgets: Keyboard events prevention while focused

since: 4.3beta (didn't check earlier) until major

Occurs in all browsers.

  1. open any image2 pluigin sample (i.e. plugins/image2/samples/image2.html)
  2. click on image (in order to focus it, blue outline should appear)
  3. press alt+f10

Expected result:
Toolbar should be focused.

Current result:
Focus stays at image widget.

Additional info:

  1. issue does not occurs within content editable.
  2. it also prevents lots of browser hotkeys, like chromium alt+d (address bar highlight).
  3. here's line which may be modified in order to solve the problem: https://github.com/ckeditor/ckeditor-dev/blob/major/plugins/widget/plugin.js#L2332

simple idea would be to add || ( CKEDITOR.ALT & keyCode ) But there still end user may experience some issue, with other browser hotkeys, i.e.

  • in most browsers pressing (just) F6 will cycle focus between browsers top ui elements, like address bar, page content, bookmarks, extensions icons.
  • F5 should reload page
  • F12 should open browser inspector

Suggestion:
We may also add handling for tab key, for jumping to next element

Change History (9)

comment:1 Changed 11 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.3
Status: newconfirmed

Hmm... seems that widget's keystroke blocker is too greedy. Perhaps it will be enough to exclude ALT keystrokes, just like we exluded CTRL ones.

comment:2 Changed 11 years ago by Piotrek Koszuliński

Owner: set to Piotrek Koszuliński
Status: confirmedassigned

comment:3 Changed 11 years ago by Piotrek Koszuliński

Owner: Piotrek Koszuliński deleted
Status: assignedconfirmed

comment:4 Changed 11 years ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: confirmedassigned

comment:5 Changed 11 years ago by Marek Lewandowski

Description: modified (diff)

comment:6 Changed 10 years ago by Marek Lewandowski

Status: assignedreview

Created branch t/10911 at dev. I've added handling for ALT + x hotkeys. At the end I didn't enabled single function key presses, because we decided that it is not that big deal for our end users.

comment:7 Changed 10 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

This is a good "one step" improvement.

comment:8 Changed 10 years ago by Marek Lewandowski

Merged with git:3c40e20dd2 to major.

comment:9 Changed 10 years ago by Marek Lewandowski

Resolution: fixed
Status: review_passedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy