Opened 10 years ago
Closed 9 years ago
#12813 closed Bug (invalid)
Cannot select widget on readonly editor in IE11
Reported by: | Pawel Pecio | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Selection | Version: | 4.3 |
Keywords: | IE | Cc: |
Description
User cannot select widget on Internet Explorer browsers (I've experienced this problem on IE11, but probably all IE versions are affected) if editor is in readonly mode.
Steps to reproduce:
- Go to CKEditor Demo page > Widgets
- Set main editor (CKEDITOR.instances.editor1) to readonly by setReadOnly(true)
- Main editor becomes grayed
- Try to select widget by clicking the widget border (not inside header or content - see attached screenshot). Internet Explorer should throw Unspecified error exception on sel.addRange(nativeRange) at the end selectRanges function.
I've investigate this problem. This bug occurs because range object container is an hidden element (display: none) and is not editable (contentedtiable=false). I don't know why IE throws an exception in this case, but it seems that not visible text cannot be selected.
This exception is a result of creating fake selection by widget. The fake() function from selection.js calls hideSelection function in which hiddenEl is created. In IE this element has display=none style (why? - in other browsers it is places out of the page content). If editor is read-only, hiddenEl is appended to the element that has contenteditable=false (so hiddenEl itself is also not editable), in conjunction with display=none it causing the exception during sel.selectRanges() call.
Proposed fix: do not set display=none for <div data-cke-hidden-sel="1" data-cke-temp="1"> element for IE (hide it in different way, maybe visibility property?, reposition by absolute positioning?) OR add contenteditable=true to the DIV. The exception is thrown only for both display=none and contenteditable=false properties set.
Version 4.4.6 is affected, probably olders too.
Attachments (1)
Change History (3)
Changed 10 years ago by
Attachment: | Zrzut ekranu z 2015-01-13 18:11:58.png added |
---|
comment:1 Changed 10 years ago by
Keywords: | IE added |
---|---|
Status: | new → confirmed |
Version: | 4.4.6 → 4.3 |
I have been able to reproduce this issue in IE8-11 from CKEditor 4.3.
IE8 reports error 800a025e while all others report error SCRIPT16389.
comment:2 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | confirmed → closed |
This issue is in fact a duplicate of #12134 and widgets should not be selectable or even focusable in readOnly mode.
Screenshot with the exception