Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#15134 closed defect (fixed)

dijit/Editor nested in dijit/form/Form causes error in IE

Reported by: adros Owned by: Ed Hager
Priority: blocker Milestone: 1.9.3
Component: Editor Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

If Editor is nested in Form, getValue function is called before the Editor is loaded (called by connectChildren of _FormMixin). getValue function applies filters, and one of the filter (_stripBreakerNodes, registred for IE) uses this.window, which is undefined before onLoad is called.

I think that another condition needs to be added to getValue function. For example:

if (this.textarea) {
    if (this.isClosed || !this.isLoaded) {
        return this.textarea.value;
    }
} else if (!this.isLoaded) {
    return ...
}

Change History (12)

comment:1 Changed 7 years ago by bill

Resolution: duplicate
Status: newclosed

Duplicate of #15030.

comment:2 Changed 6 years ago by Colin Snover

Milestone: tbd1.9.3
Priority: undecidedblocker
Resolution: duplicate
Status: closedreopened

This is not really a duplicate of #15030, or the fix for #15030 was wrong, one or the other. People are adding new methods (_stripTrailingEmptyNodes now) and keep causing this error to happen because it needs to be fixed once here, not many times elsewhere.

comment:3 Changed 6 years ago by Colin Snover

Owner: set to Ed Hager
Status: reopenedassigned

For more information, this issue was reintroduced in a4b34a345d3daa981ed0199d1795ca477817e082

comment:4 Changed 6 years ago by Colin Snover

Ed did you have a patch for this?

comment:5 Changed 6 years ago by Ed Hager

comment:6 Changed 6 years ago by bill

The patch looks good, assuming that the correct editor value is returned. It just needs an automated test that creates an Editor and then immediately queries the value. (The Editor doesn't need to be inside a form per se.)

Obviously, #15030 shouldn't have been checked in w/out a test case, or we wouldn't have had this regression in the first place.

comment:7 Changed 6 years ago by dylan

Bill, can we make this change for 1.9.3, or do you want an additional test before it gets made. We would like to get 1.9.3 released this week and this is the last blocker.

comment:8 Changed 6 years ago by bill

The behavior looks wrong, get("value") is returning "" instead of the actual value of the editor.

comment:9 Changed 6 years ago by Ed Hager

Updates:

  • I made the editor return this.value before the iframe loads
  • removed a line from open that was deleting this.value
  • added test cases retrieving the editor's value before the iframe loads

Commit: https://github.com/edhager/dijit/commit/1e5f39cc4811b3b4b53e1c9ac2f2ec1f6ffb217a Pull Request: https://github.com/dojo/dijit/pull/21

comment:10 Changed 6 years ago by dylan

Bill, I think this addresses everything, and I also had Ed remove the spurious delete this.value as well. Ready for your review/testing.

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

Resolution: fixed
Status: assignedclosed

In 4dc879a433b3c3db4310011cf28e13edd0801139/dijit:

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

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

In 73c826455d90aefa088a165b6fc240edbcf80199/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.