Opened 10 years ago
Closed 10 years ago
#12185 closed Bug (fixed)
[IE9QM] Error thrown when moving mouse over focused editor's scrollbar
Reported by: | Piotrek Koszuliński | Owned by: | Marek Lewandowski |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.4 |
Component: | General | Version: | |
Keywords: | IE | Cc: |
Description
- Open replacebycode sample after removing doctype from it (so IE9 works in quirks mode)
- Focus editor.
- Move mouse over editor's scroll bar.
- Error is thrown -
Object doesn't support property or method 'contains'
.
Not reproducible on IE8QM.
Change History (8)
comment:1 Changed 10 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
Milestone: | CKEditor 4.4.3 → CKEditor 4.4.4 |
---|
The 4.4.3 milestone was shortened, so the remaining tickets must be postponed.
comment:4 Changed 10 years ago by
Owner: | set to Marek Lewandowski |
---|---|
Status: | confirmed → assigned |
comment:5 Changed 10 years ago by
Status: | assigned → review |
---|
The reason for that issue was DOMDocument.elementFromPoint()
which is returning empty object in this case, that caused CKEDITOR.dom.element to be created with an empty object.
I was considering adding a following code:
if ( element && CKEDITOR.tools.objectCompare( element.$, {} ) ) { return null; }
Rather than change elementFromPoint
function, but turns out that isLine()
handles null value gracefully, and other conditions are protected against null
value.
Pushed to t/12185 at dev.
comment:6 Changed 10 years ago by
Status: | review → review_failed |
---|
- Don't do object comparison - this is totally unnecessary. Check whether returned object has the type property - we use this duck typing a lot.
- Why have you added widget plugin to tests?
comment:7 Changed 10 years ago by
Status: | review_failed → review |
---|
Added mentioned changes.
Pushed to t/12185 at dev.
comment:8 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | review → closed |
I needed to amend the last commit because:
- Native node has nodeType property, not type. Magicline was totally broken after that.
- The test wasn't verifying anything, so I removed it. If you wrote test before fixing bug you would know that.
Fixed on master with git:20906e2.
Error is thrown from `dom.element.contains()` method. We had few issues with DOM API failing when using
domEvent.getTarget()
from mouse event fired on scroll bar because the returned node was, if I remember correctly, the document or document element (html) or empty object. Anyway - type check or other kind of verification before using contains() is a must.