Opened 12 years ago

Closed 12 years ago

#9459 closed Bug (fixed)

[Opera&Framed] Focus is lost after clicking in linki inside a combo or editor

Reported by: Piotrek Koszuliński Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.0
Component: Core : Focus Version: 4.0
Keywords: Cc:

Description

Test case 1

  1. Open attached sample and open console (ctrl+shift+i on Opera).
  2. Select text in editor.
  3. Open font-size combo and click some value.
  • Expected: no blur logged on console.
  • Actual: focus, selectionChange, selectionChange, blur.

It's also possible to verify that something's wrong by selecting different parts of text in editor. Toolbar buttons like bold should react, but because selectionChange isn't fired that's not happening.

After investigation we're pretty sure that this is caused by async focus fired on link inside combo. Click on this link causes correct panel.close() && editor.focus(), but then deferred focus happens and moves focus back to panel.

Test case 2

  1. Open attached sample and open console (ctrl+shift+i on Opera).
  2. Focus editor.
  3. Click link inside editor.
  • Expected: no blur logged on console
  • Actual: focus, selectionChange, selectionChange, blur.

Attachments (1)

operafocus.html (969 bytes) - added by Piotrek Koszuliński 12 years ago.

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by Piotrek Koszuliński

Attachment: operafocus.html added

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

Owner: set to Piotrek Koszuliński
Status: newassigned

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

Another place where click causes blur is space under content.

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

I've tested some ways to block focus event on elements outside editable. E.g.:

  1. Forcing editor.focus() inside focus listener helped, but this solution is hacky and inconvenient - such listener would have to be added to all links - so inside combos, color palettes, etc.
  2. Locking focusManager for few ms in click listener. That helped and looks promising.

Unfortunately it turned out that selectionChange haven't been fired after performing TCs mentioned in this ticket not because of focus lost, but editor returning all the time the same selection. This broken state resets after next correct blur/focus. I'll report new issue for that after I gather more information.

Version 0, edited 12 years ago by Piotrek Koszuliński (next)

comment:4 Changed 12 years ago by Piotrek Koszuliński

Summary: [Opera] Focus is lost after clicking in linki inside a combo or editor[Opera&Framed] Focus is lost after clicking in linki inside a combo or editor

comment:5 Changed 12 years ago by Piotrek Koszuliński

Status: assignedreview

Pushed t/9459 with Garry's fix.

comment:6 Changed 12 years ago by Piotrek Koszuliński

Status: reviewreview_passed

R+, because this is the cleanest solution of all.

comment:7 Changed 12 years ago by Piotrek Koszuliński

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