Ticket #7193 (closed Bug: duplicate)
IE9 - JS error in console while adding new paragraphs before <hr/>
| Reported by: | krst | 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
Change History
comment:2 in reply to: ↑ 1 Changed 2 years ago by krst
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 2 years ago by wwalc
- Status changed from pending to confirmed
- Milestone set to CKEditor 3.5.3
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:6 Changed 2 years ago by garry.yao
- Owner set to garry.yao
- Status changed from confirmed to review
Propose a fake to fix it.
comment:7 Changed 2 years ago by wwalc
- Status changed from review to 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
comment:8 Changed 2 years ago by garry.yao
- Status changed from review_failed to 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 2 years ago by fredck
- Status changed from review to 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?
comment:11 Changed 2 years ago by garry.yao
IE bug reported at https://connect.microsoft.com/IE/feedback/details/652520
comment:12 follow-up: ↓ 13 Changed 2 years ago by Saare
- Status changed from review to review_failed
Arrow and ESC keys should still be available for navigation around the <hr>, e.g. go above it.
comment:13 in reply to: ↑ 12 Changed 2 years ago by garry.yao
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:15 Changed 7 months ago by j.swiderski
DUP of #8395
comment:16 Changed 7 months ago by j.swiderski
- Status changed from review_failed to closed
- Resolution set to duplicate

Shouldn't the inserted <hr> should appears outside of paragraph, how to reach here?