#12595 closed defect (fixed)
[regression] dijit.base_.popup: cannot popup a domNode that has no parentNode
Reported by: | baraclese | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.6.1 |
Component: | Dijit | Version: | 1.6.0 |
Keywords: | dijit popup | Cc: | |
Blocked By: | Blocking: |
Description
This applies to v1.6.0 and I saw that the same error was backported to v1.5.1.
In dijit/_base/popup.js:80 in function _createWrapper:
change the line from
var wrapper = widget.declaredClass ? widget._popupWrapper : (dojo.hasClass(widget.parentNode, "dijitPopup") && widget.parentNode),
to
var wrapper = widget.declaredClass ? widget._popupWrapper : (widget.parentNode && dojo.hasClass(widget.parentNode, "dijitPopup")),
If dojo.hasClass(widget.parentNode, '...') is executed with a nonexisting parentNode then that call will produce a javascript error, therefore the assertion that widget.parentNode exists must come before the dojo.hasClass call.
Change History (3)
comment:1 Changed 10 years ago by
Milestone: | tbd → 1.6.1 |
---|---|
Owner: | set to bill |
Summary: | dijit.base_.popup regression: cannot popup a domNode that has no parentNode → [regression] dijit.base_.popup: cannot popup a domNode that has no parentNode |
comment:2 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
OK, thanks, I see it, looks like you are using the old APi to popup.open() passing in a DOMNode rather than a widget, and that we are missing tests for that.