Opened 14 years ago

Closed 14 years ago

#4650 closed Bug (fixed)

Can not select image when navigating text with arrow keys.

Reported by: Joe Kavanagh Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.3
Component: Accessibility Version: 3.0.1
Keywords: IBM Confirmed Review? Cc: dchojna@…

Description (last modified by Frederico Caldeira Knabben)

  1. Add some text, insert an image, and add some more text after the image.
  2. Using the left arrow key move the cursor back to select the image.

Observe that the cursor by-passes the image an moves to the text before the image. This prevents the user from opening the image context menu using the keyboard.

Attachments (2)

4650.patch (1.6 KB) - added by Garry Yao 14 years ago.
4650_2.patch (5.4 KB) - added by Garry Yao 14 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 14 years ago by Joe Kavanagh

This is also occurring for flash objects.

comment:2 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added
Milestone: CKEditor 3.1CKEditor 3.2

This may be a browser limitation. We need to check if it's possible to workaround it.

comment:3 Changed 14 years ago by Garry Yao

@fred That's exactly what been proposed these days at Mozilla.
https://wiki.mozilla.org/Accessibility/EditorBehaviourOnUserInput

Changed 14 years ago by Garry Yao

Attachment: 4650.patch added

comment:4 Changed 14 years ago by Garry Yao

Keywords: Review? added
Owner: set to Garry Yao
Status: newassigned

It's definitely a browser bug, and has appearance on both IE and Firefox (works with Webkit for me right now).
Even worse, this phenomenon happens to every type of control ( checkbox, img, select) in condition that the element is surrounded by text. Most unfortunately, due to #703 and #3069, what been impacted is that SHIFT+ARROW keys/mouse drag will be the only way for selecting such elements in FF3.
Considering the wide affecting of this bug, I'm proposing an fall-back range inspection approach to selection.getSelectedElement to correctly figure out the element underhood.
Then we'll be sitting and looking for the real fix at the browser side.

comment:5 Changed 14 years ago by Frederico Caldeira Knabben

Description: modified (diff)

comment:6 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

Functions like getSelectedElement we extensively used in the editor during its operations. Because of this, we must avoid making DOM manipulations (creating bookmarks) inside of it, being limited to looking at the native selection/range objects to figure things out.

Are we able to fix things on key press instead, like selecting and deselecting the object on arrows press?

comment:7 in reply to:  6 Changed 14 years ago by Garry Yao

Keywords: Review? added; Review- removed

Replying to fredck:

Functions like getSelectedElement we extensively used in the editor during its operations. Because of this, we must avoid making DOM manipulations (creating bookmarks) inside of it, being limited to looking at the native selection/range objects to figure things out.

Though it could be proved that selecton:getSelectedElement wasn't really been used *exclusively*, currently, it's only used by some of our dialogs.
I would still like to follow your advice as it's obviously possible for us to complete this task more unobtrusively, without bothering the walker.

Are we able to fix things on key press instead, like selecting and deselecting the object on arrows press?

Managed keystroke should always be our last choice...for this case, we're not only talking about arrow keys, but also mouse drag; And we're not talking only about 'Link' dialog, but all control elements.

Providing a new patch based on Fred's suggestion.

Changed 14 years ago by Garry Yao

Attachment: 4650_2.patch added

comment:8 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.2CKEditor 3.3

I would prefer taking more time to this ticket.

comment:9 Changed 14 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Recent changes, specially [5255], have already fixed this issue.

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