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
- Open attached sample and open console (ctrl+shift+i on Opera).
- Select text in editor.
- 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
- Open attached sample and open console (ctrl+shift+i on Opera).
- Focus editor.
- Click link inside editor.
- Expected: no blur logged on console
- Actual: focus, selectionChange, selectionChange, blur.
Attachments (1)
Change History (8)
Changed 12 years ago by
Attachment: | operafocus.html added |
---|
comment:1 Changed 12 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | new → assigned |
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
I've tested some ways to block focus event on elements outside editable. E.g.:
- 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. - 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.
comment:4 Changed 12 years ago by
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:6 Changed 12 years ago by
Status: | review → review_passed |
---|
R+, because this is the cleanest solution of all.
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Another place where click causes blur is space under content.