#2339 closed defect (duplicate)
PopupMenu2 doesn't collapse when mouse click outside menu.
Reported by: | guest | Owned by: | liucougar |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
This is probably the same issue as with #2291. The problem is with dojo.widget.PopupManager?.registerWin()
this.registerWin = function(/*Window*/win){ // summary: register a window so that when clicks/scroll in it, the popup can be closed automatically if(!win.__PopupManagerRegistered) { dojo.event.connect(win.document, 'onmousedown', this, 'onClick'); dojo.event.connect(win, "onscroll", this, "onClick"); dojo.event.connect(win.document, "onkey", this, 'onKey'); win.__PopupManagerRegistered = true; this.registeredWindows.push(win); } };
'this' referenced in each dojo.event.connect() refers to the function itself where as it should refer to dojo.widget.PopupManager?. Changing the function to the following works fine.
this.registerWin = function(/*Window*/win){ // summary: register a window so that when clicks/scroll in it, the popup can be closed automatically if(!win.__PopupManagerRegistered) { dojo.event.connect(win.document, 'onmousedown', dojo.widget.PopupManager, 'onClick'); dojo.event.connect(win, "onscroll", dojo.widget.PopupManager, "onClick"); dojo.event.connect(win.document, "onkey", dojo.widget.PopupManager, 'onKey'); win.__PopupManagerRegistered = true; this.registeredWindows.push(win); } };
Change History (3)
comment:1 Changed 14 years ago by
Milestone: | → 0.4.2 |
---|---|
Owner: | changed from bill to liucougar |
comment:2 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
dup of #2291