Opened 8 years ago

Closed 4 years ago

#13744 closed defect (patchwelcome)

EnterKeyHandling crashes IE8, hangs IE9

Reported by: gabriele.tassi Owned by:
Priority: high Milestone: tbd
Component: Editor Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

A particular sequence of keys in a dijit.Editor makes IE7 crash. To reproduce the error:

  • create an instance of dijit.Editor either programmatically or declaratively, with as content some text surrounded by the tag '<p>' (like the first example at http://docs.dojocampus.org/dijit/Editor, but also a content as simple as '<p>test</p>' will work)
  • put the cursor anywhere in the editor but the very first position (for example, if the content is '<p>test</p>', put the cursor between 'te' and 'st')
  • enter the following key sequence: ENTER, ENTER, BACKSPACE, BACKSPACE

, ENTER, ENTER

  • IE7 crashes

This behaviour has been noticed in a fully updated installation of Windows XP service pack 2 with IE7, with Dojo 1.6.1 and 1.6.0. In the same test environment, Dojo 1.5 does not cause the error.

Attachments (1)

TestEditor.html (665 bytes) - added by gabriele.tassi 8 years ago.
minimal HTML page to reproduce the error

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by gabriele.tassi

Attachment: TestEditor.html added

minimal HTML page to reproduce the error

comment:1 Changed 8 years ago by gabriele.tassi

Update

The problem occurs also in IE8.

After further research, it seems that the problem is caused by the plugin dijit._editor.plugins.EnterKeyHandling? : removing the plugin removes the problem.

Using the plugin with the property 'blockNodeForEnter' set to 'DIV' also solves the problem, whereas setting the same property to 'P' causes the problem only by using the keys SHIFT+ENTER instead of ENTER.

It seems finally that the problem occurs every time a tag <br> is used to insert line breaks. These are the possible values of the property 'blockNodeForEnter':

  • 'BR' (default) : tag <br> is used, error occurs
  • 'DIV' : tag <div> is used, error does not occur
  • 'P'
    • ENTER : tag <p> is used, error does not occur
    • SHIFT+ENTER : tag <br> is used, error occurs

This can also be valid as a workaround.

comment:2 Changed 8 years ago by bill

Summary: dijit.Editor make IE7 crashdijit.Editor make IE crash using EnterKeyHandling plugin

See also #14027.

comment:3 Changed 8 years ago by Jared Jurkiewicz

Confirmed this occurs, but befuddled as to why. Seems like an IE bug itself. Manipulating dom should not cause a crash like that.

comment:4 Changed 7 years ago by spidertom

FWIW, it appears in IE9 this combination hangs the browser instead of crashing

comment:5 Changed 4 years ago by bill

Summary: dijit.Editor make IE crash using EnterKeyHandling pluginEnterKeyHandling crashes IE8, hangs IE9

comment:6 Changed 4 years ago by bill

Resolution: patchwelcome
Status: newclosed

Still happens in master branch, but the good news is that it works on IE10 (and presumably versions after that). Realistically I don't see this getting fixed, unless someone has a patch.

Note: See TracTickets for help on using tickets.