Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#14324 closed task (fixed)

remove editor reference to dijit global

Reported by: bill Owned by: bill
Priority: high Milestone: 1.7.5
Component: Editor Version: 1.7.0
Keywords: Cc: Douglas Hays, ben hockey
Blocked By: Blocking:

Description

The editor references the dijit global during initialization as a way to set the <iframe> initial contents:

var iframeSrcRef = 'parent.' + dijit._scopeName + '.byId("'+this.id+'")._iframeSrc';
var s = 'javascript:(function(){try{return ' + iframeSrcRef + '}catch(e){document.open();document.domain="' +
		document.domain + '";document.write(' + iframeSrcRef + ');document.close();}})()';

This indirection of making src point at a variable, rather then just being a string literal, was done due to a limitation of the src attribute length in an old browser. Need to check what that browser was and if we still support it or not.

The current design is stopping dijit from working without globals.

Change History (4)

comment:1 Changed 8 years ago by bill

Summary: editor reference to dijit globalremove editor reference to dijit global
Type: defecttask

My tests (all on Windows) with inlined src:

  • IE 6 (test_Editor.html loads)
  • FF 3.5.9 (test_Editor.html loads)
  • Safari 3.2.3 (test_Editor.html loads)
  • IE 8 (passes dijit/tests/editor/runTests.html)
  • IE 9 (half passes dijit/tests/editor/runTests.html, IE9 has lots of issues in general)
  • Chrome 16 beta (passes dijit/tests/editor/runTests.html except for pre-existing EnterKeyHandling failure)
  • FF 8 (passes dijit/tests/editor/runTests.html)

It looks like it's no longer necessary to use that parent.dijit._iframeSrc indirection.

comment:2 Changed 8 years ago by bill

Resolution: fixed
Status: newclosed

In [27128]:

Workaround IE9 bug where iframe is initialized twice, and the first time "parent" points to a phantom window object without dijit defined, and "frameElement" is null, fixes #14323 !strict. Also removes use of dijit global, fixes #14324 !strict.

comment:3 Changed 7 years ago by bill

In [30261]:

backport [27128] to 1.7, fixing editor initialization problems on IE9/IE10, fixes #14323, #14324 on 1.7 branch !strict.

comment:4 Changed 7 years ago by bill

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