Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17216 closed defect (fixed)

IE9 in Quirks mode dijit/Editor fails to restore selection properly

Reported by: Nick Fenwick Owned by: bill
Priority: undecided Milestone: 1.9.1
Component: Editor Version: 1.9.0
Keywords: Cc:
Blocked By: Blocking:

Description

If you are unfortunate enough to be working on a page that IE9 renders in quirks mode, e.g. it's missing a DOCTYPE entirely, I've found the selection is not restored when a toolbar button is used.

Expected result: text stays selected and font is changed. Actual result: font is not changed and cursor resets to start of Editor

It seems to stem from the _getBookmark function coming up with a 'mark' object that consists of a string rather than an object with startContainer, endContainer etc. attributes. Thus all the operations on mark that try to use these attributes fail and _restoreSelection cannot work.

Note that IE10 in Quirks mode does not have this problem, it's only IE9 Quirks mode.

It seems that we should use the code path designed for IE < 9 if quirks mode is enabled.

I've made a sandbox that demonstrates the fixed code, with the guts of two Editor functions overridden with a "HACK HERE" comment indicating the change: http://dojo-sandbox.net/public/a7041/0

Attachments (1)

17216.patch (721 bytes) - added by Nick Fenwick 6 years ago.
Example patch to trunk.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Nick Fenwick

Attachment: 17216.patch added

Example patch to trunk.

comment:1 Changed 6 years ago by Nick Fenwick

By the way, the best way to run that sandbox is to load it in IE9 in the default mode (Standards mode), click 'Launch For Debug' which will launch the bucket in a popup window, then hit f12 and switch to Quirks mode. Switching the main dojo-sandbox GUI to quirks mode tends to break it horribly.

comment:2 Changed 6 years ago by bill

Component: GeneralEditor
Milestone: tbd1.9.1
Owner: set to bill
Status: newassigned

OK thanks, I can check that in, but remember that for 2.0 we won't be supporting quirksmode anymore.

comment:3 Changed 6 years ago by Bill Keese <bill@…>

Resolution: fixed
Status: assignedclosed

In e51874fd0586f32d7dca556e6dc916a4d1252132/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:4 Changed 6 years ago by Bill Keese <bill@…>

In c86c4ea8504875fa749fc096043907bdf90de1e5/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.