Opened 14 years ago

Closed 14 years ago

#106 closed defect (fixed)

Javascript error in IE when link an image

Reported by: EtaBeta Owned by: gogo
Priority: highest Milestone:
Component: Xinha Core Version:
Severity: critical Keywords:
Cc:

Description

In the latest nightly build, when you link an image and press the "Insert Web Link" icon in the toolbar using IE, it generates a javascript error.

Change History (2)

comment:1 Changed 14 years ago by ryan@…

At line 2767 in the htmlarea.js file change this section of code

if (!link) {
    var sel = editor._getSelection();
    var range = editor._createRange(sel);
    var compare = 0;
    if (HTMLArea.is_ie) {
	compare = range.compareEndPoints("StartToEnd", range);
    } else {
      compare = range.compareBoundaryPoints(range.START_TO_END, range);
    }

to

if (!link) {
    var sel = editor._getSelection();
    var range = editor._createRange(sel);
    var compare = 0;
    if (HTMLArea.is_ie) {
		if(sel.type == "Control") {
			compare = range.length; 
		} else {
			 compare = range.compareEndPoints("StartToEnd", range);
		}
    } else {
      compare = range.compareBoundaryPoints(range.START_TO_END, range);
    } 

comment:2 Changed 14 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

Applied in changeset:114

Note: See TracTickets for help on using tickets.