Opened 12 years ago

Closed 7 years ago

Last modified 7 years ago

#11988 closed defect (patchwelcome)

_Widgets have no way to reliably determine whether they are visible

Reported by: Remoun Metyas Owned by:
Priority: high Milestone: 1.13
Component: Dijit Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


Perhaps make _onShow and onHide set a flag (patch attached).

This may not work seamlessly with existing widgets, as some don't call this.inherited when they ovverride onHide/_onShow.

Attachments (1)

_Widget.hidden.patch (566 bytes) - added by Remoun Metyas 12 years ago.
Add a _showing flag to _Widgets

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Remoun Metyas

Attachment: _Widget.hidden.patch added

Add a _showing flag to _Widgets

comment:1 Changed 12 years ago by bill

Milestone: tbdfuture

Hmm, StackContainer children already have a "selected" attribute they can check, and TitlePane and Dialog have an "open" attribute.

I guess this is for TooltipDialog, Calendar, ColorPalette, etc... widgets that just happen to be used as drop downs. I suppose a "showing" flag makes sense although it makes me nervous since any random displayed widget (for example, a TabContainer) will have showing=false (or technically, showing is undefined), rather than showing=true.

comment:2 Changed 11 years ago by Remoun Metyas

I agree that showing being undefined (and having to check showing !== true) is awkward. I had initially used _hidden, but found that onHide is never called for tabs that are never selected. Checking .selected and .open is awkward, too. I can't, however, think of a better alternative.

Relatedly, there's a TODO comment in dijit._base.popup: "in 2.0 standardize onShow() (used by StackContainer?) and onOpen() (used here)".

comment:3 Changed 7 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: newclosed

This would unfortunately need to be revisited given that the patch has sat around for 5 years. If there's still interest in this, please create a new pull request and we'll consider for 1.12. Closing as patchwelcome for now.

comment:4 Changed 7 years ago by dylan

Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.