Closed sleemanj closed 3 years ago
I '''strongly''' suspect this will be related to ticket:1508 owing to the fact that _getFirstAncestor also uses createRange, which does that focus when a None selection (just an insertion point) is presented to it.
That would focus the editor as a whole and probably produce this null return.
Microsoft made definite changes to IE8's focus model,
''Internet Explorer 8 and later. When a Web page is displayed in IE8 mode, an object cannot receive focus when sCanEdit is set to false. When pages are displayed in earlier document compatibility modes, objects can receive focus when sCanEdit is false.''
http://msdn.microsoft.com/en-us/library/ms533690(VS.85).aspx
duplicate
new
to closed
@sleemanj commented:
See #1508, #1471
This is IE only. Let's say you have code like this.
If the selection is empty, I mean you just clicked into the document, _getFirstAncestor() will return null on IE8. Even though it is surrounded by . Firefox behaves right and returns the ancestor node.
getSelection() seems to be ok as it returns a selection object even in IE.
Reported by guest, migrated from http://trac.xinha.org/ticket/1510