Opened 14 years ago
Closed 12 years ago
#7193 closed Bug (duplicate)
IE9 - JS error in console while adding new paragraphs before <hr/>
Reported by: | Krzysztof Studnik | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.5.1 |
Keywords: | IE9 | Cc: |
Description
Environment
IE9
TC
- clear editor content
- insert
<hr />
- set cursor at the beginning of paragraph that contains horizontal line - press cursor UP key (little cursor should be blinking at the beginning of line)
- press enter
Expected result
New paragraph is added before horizontal line
Actual result
New paragraph is added before line, but in console error is thrown:
SCRIPT5007: Unable to get value of the property 'insertBeforeMe': object is null or undefined ckeditor.js, line 32 character 214
Attachments (3)
Change History (19)
comment:1 follow-up: 2 Changed 14 years ago by
Status: | new → pending |
---|
comment:2 Changed 14 years ago by
Replying to garry.yao:
set cursor at the beginning of paragraph that contains horizontal line...
Shouldn't the inserted <hr> should appears outside of paragraph, how to reach here?
using cursor keys on keyboard, when caret is blinking below <HR> press key "left".
comment:4 Changed 14 years ago by
Milestone: | → CKEditor 3.5.3 |
---|---|
Status: | pending → confirmed |
I have reproduced this error by following the original TC:
SCRIPT5007: Unable to get value of the property 'insertBeforeMe': object is null or undefined range.js, line 163 character 5
It looks like this is the only way we have found so far how to trigger this JavaScript bug (quite an edge case), but in any case it would be nice to do something to protect against such errors, just to be safe.
comment:5 Changed 14 years ago by
Priority: | Low → Normal |
---|
Changed 14 years ago by
Attachment: | 7193.patch added |
---|
comment:6 Changed 14 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | confirmed → review |
Propose a fake to fix it.
comment:7 Changed 14 years ago by
Status: | review → review_failed |
---|
Is there any other way to fix it? <hr>
element may be styled just like any other elements, e.g. with
hr { border: 0; width: 80%; color: #f00; background-color: #f00; height: 5px; }
By introducing a fake element we are losing the wysiwyg experience and move one step back.
Can we perhaps simply check the reason of the following error in range.js?
'insertBeforeMe': object is null or undefined range.js, line 163 character 5
Changed 14 years ago by
Attachment: | 7193_2.patch added |
---|
comment:8 Changed 14 years ago by
Status: | review_failed → review |
---|
The error was caused by exactly the IE9 issue described in #7186, and considering it's quite an obvious issue, we'd better providing a solution for it.
New patch allows fake elements to be styled in their real type.
comment:9 Changed 14 years ago by
Status: | review → review_failed |
---|
Fake elements is not the way to go for it here as well. It's an ugly workaround.
I'm sure we're able to handle <hr> on wywiwyg view. We're already doing lots of caret position checks. Aren't we able to do the same in this case?
Changed 14 years ago by
Attachment: | 7193_3.patch added |
---|
comment:10 Changed 14 years ago by
Status: | review_failed → review |
---|
comment:11 Changed 14 years ago by
IE bug reported at https://connect.microsoft.com/IE/feedback/details/652520
comment:12 follow-up: 13 Changed 14 years ago by
Status: | review → review_failed |
---|
Arrow and ESC keys should still be available for navigation around the <hr>, e.g. go above it.
comment:13 Changed 14 years ago by
Replying to Saare:
Arrow and ESC keys should still be available for navigation around the <hr>, e.g. go above it.
I've tried with no access, the buggy hr is cursor sticky.
comment:14 Changed 14 years ago by
Milestone: | CKEditor 3.5.3 |
---|
comment:16 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | review_failed → closed |
Shouldn't the inserted <hr> should appears outside of paragraph, how to reach here?