Opened 15 years ago
Closed 15 years ago
#3132 closed defect (fixed)
On 0.9 custom builds with dijit.form.AutoCompleter, the dropdown fails
Reported by: | guest | Owned by: | haysmark |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
line 63 in dijit.form._DropDownTextBox:
if(!eval(this._popupName)){
create the master popup for the first time var node=document.createElement("div"); document.body.appendChild(node); var popupProto=dojo.getObject(this._popupClass, false); eval(this._popupName+"=new popupProto(this._popupArgs, node);");
}
fails miserably, because the rhino compiler transforms it to this:
if(!eval(this._popupName)){ var node=document.createElement("div"); document.body.appendChild(node); var _59b=dojo.getObject(this._popupClass,false); eval(this._popupName+"=new popupProto(this._popupArgs, node);"); }
See how the popupProto identifier was transformed into _59b? Well, the popupProto that appears in the eval() doesn't get transformed. Horrible JS bug ensues.
Please implement a different way of introspecting that thing.
Maybe this[this._popupName] = new popupProto(this._popupArgs, node) can work? I am not qualified to tell due to my poor JS skills.
Change History (2)
comment:1 Changed 15 years ago by
Milestone: | → 0.9beta |
---|---|
Owner: | changed from bill to haysmark |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [8745]) Fixes #3132. Proxy commit for haysmark. Removed eval statements in _DropDownTextBox; caused custom builds to fail. Refactored _popupName (was being evaled) to _hasMasterPopup boolean.