Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#12008 closed defect (fixed)

Editor EnterKeyHandling plugin causes IE to crash

Reported by: Katie Vance Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.7.6
Component: Editor Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

Plugin crashes IE when blockNodeforEnter='BR'

Steps to reproduce:

  1. Open tests\editor\EnterKeyHandling?.html
  1. In the first editor window, select all the text and delete it.
  1. Type in anything.
  1. Select all of your new text and copy and paste a couple of times.
  1. Hit enter.

IE will crash. The crash may not be a bug in the editor plugin. I've traced it down to the dojo.stopEvent(e); line of the setEditor method of the plugin. Further debugging will need to be done to determine the cause of the IE crash.

This happens on IE6-8.

Change History (16)

comment:1 Changed 9 years ago by Jared Jurkiewicz

Owner: Jared Jurkiewicz deleted

comment:2 Changed 9 years ago by Jared Jurkiewicz

It's crashing in the code where it tries to reposition the cursor in front of the range. Around line 272:

dojo.destroy(rs); newrange = dijit.range.create(dojo.gobal); newrange.setStart(endNode,0); selection.removeAllRanges(); selection.addRange(newrange);

Why, I have no idea.

comment:3 Changed 9 years ago by Katie Vance

It is working in Dojo 1.5. This seems to be a new issue in trunk.

comment:4 Changed 9 years ago by Katie Vance

It's crashing for me on line 398 of range.js. When we try to access htmlText of the range. It looks as though the range is wrong because in the debugger the text indicates there was some kind of error.

comment:5 Changed 9 years ago by Katie Vance

This was regressed in the trunk by [22797].

comment:6 Changed 9 years ago by Katie Vance

[22796] and [22795] are changesets that go along with [22797]. So likely it was first regressed in [22795]

comment:7 Changed 9 years ago by Katie Vance

The problem seems to be an issue with placing an empty text node at the beginning of a new range. Once we add the new range to the selection we are setting IE up to crash. (Not sure why) It will however work the very first time we hit enter and do not do any copy and pasting. However, subsequent times after that, IE will crash. We can work around the issue by not placing empty text nodes into the dom, however, without doing so I have not been able to find a way to place the caret on the next line (after the <BR>). Any ideas?

comment:8 Changed 9 years ago by Jared Jurkiewicz

Place a text node with a space instead of an empty one, perhaps, and position before that in the case of IE? It introduces an extra space, but I don't know what else to do.

comment:9 Changed 9 years ago by Jared Jurkiewicz

(In [23267]) Fix for IE crash with empty text nodes. \!strict refs #12008

comment:10 Changed 9 years ago by Jared Jurkiewicz

Milestone: tbd1.6
Owner: set to Jared Jurkiewicz

comment:11 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

comment:12 Changed 9 years ago by Jared Jurkiewicz

The above seems to resolve the problem fairly well. As noted, avoid inserting an empty text node, then just clear it after the fact.

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

In f569ab4d48ab9a225f12eae3bdf423abcd25e84f/dijit:

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

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

In 7adf55b21a7938dce7d369dacf87c423d7423be7/dijit:

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

comment:14 Changed 5 years ago by Bill Keese <bill@…>

In d991ff0ad244eef0e2a6cc83545b06f48041ddba/dijit:

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

comment:15 Changed 5 years ago by bill

Milestone: 1.61.7.6
Note: See TracTickets for help on using tickets.