#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: |
Description
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)
Change History (5)
Changed 12 years ago by
Attachment: | _Widget.hidden.patch added |
---|
comment:1 Changed 12 years ago by
Milestone: | tbd → future |
---|
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
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
Milestone: | future → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | new → closed |
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
Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.
Add a _showing flag to _Widgets