Closed
Bug 467360
Opened 16 years ago
Closed 16 years ago
support buttons with child panels
Categories
(Toolkit :: UI Widgets, defect)
Toolkit
UI Widgets
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: enndeakin, Assigned: enndeakin)
References
Details
(Keywords: dev-doc-needed, fixed1.9.1)
Attachments
(1 file, 2 obsolete files)
19.52 KB,
patch
|
neil
:
review+
neil
:
superreview+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
There was a request by mano at one point to support putting panels inside buttons, as in:
<button id="button" type="panel" label="Button">
<panel>
<textbox/>
</panel>
</button>
that would work just like type="menu".
Attachment #350769 -
Flags: review?(neil)
Assignee | ||
Comment 1•16 years ago
|
||
Dao, an issue I found with this is that in this example:
<toolbarbutton id="button" type="panel" label="Button">
<panel>
<textbox/>
</panel>
</toolbarbutton>
On Mac, the text-shadow defined on the toolbarbutton is messing up the textbox in the panel. Characters typed aren't being drawn correctly, instead they seem to be just a few pixels of garbage at the left edge of the textbox. Is there still an issue with text-shadow inheritance?
Comment 2•16 years ago
|
||
(In reply to comment #1)
> On Mac, the text-shadow defined on the toolbarbutton is messing up the textbox
> in the panel.
Sure that it's text-shadow and not something else? Should be easy to investigate this (at least, exclude text-shadow) using DOMi, e.g. by looking a the computed style, setting style="text-shadow:none" on the toolbarbutton, etc.
By the way, it's also a little strange that popups inherit text-shadow.
Assignee | ||
Comment 3•16 years ago
|
||
Actually, it seems more work may be necessary to support this. Another issue is that the button key event handling is also interfering.
Comment 4•16 years ago
|
||
Comment on attachment 350769 [details] [diff] [review]
implement this
I guess this works at least as well as <button type="menu"><menupopup ignorekeys="true"> ;-)
Anyway, I have no objection to it.
Attachment #350769 -
Flags: review?(neil) → review+
Assignee | ||
Comment 5•16 years ago
|
||
- changes the popup manager so that it keeps track of the popup type for menu opens, so that focus is cleared in FirePopupShowingEvent.
- disables button key navigation when a button's popup is open or is a popup type of menu.
Comment 6•16 years ago
|
||
Whats needed (aside from review) to get this patch in for 1.9.1? I'm playing with panels and it seems they solve at least some of my problems with popup-in-popups. I think since the text-shadow issue can be worked around quite easily, this bug should go in soon.
Flags: blocking1.9.1?
Comment 7•16 years ago
|
||
I also think all other elements that support menupopups should support panels.
Assignee | ||
Updated•16 years ago
|
Attachment #351248 -
Flags: review?(neil)
Assignee | ||
Comment 8•16 years ago
|
||
Comment on attachment 351248 [details] [diff] [review]
updated patch, also fixes bug 393884
OK, yes I think only the text shadow issue remains, which is bug 467817.
Assignee | ||
Comment 9•16 years ago
|
||
(In reply to comment #7)
> I also think all other elements that support menupopups should support panels.
What other elements? The only other elements are all menu related and it doesn't make sense to support panels for them.
Comment 10•16 years ago
|
||
Comment on attachment 351248 [details] [diff] [review]
updated patch, also fixes bug 393884
>+ if (this.open)
> return;
>
>+ var type = this.type;
>+ if (type != "menu" && type != "menu-button" && type != "panel") {
Just skimming this: I'm not sure these tests are correct, in particular the open test is incorrect for non-menu buttons and the type test isn't generic. My suggestions would be something like this:
if (this.boxObject instanceof Components.interfaces.nsIMenuBoxObject) {
if (this.open)
return;
} else {
/* arrow key processing here */
}
Comment 11•16 years ago
|
||
Comment on attachment 351248 [details] [diff] [review]
updated patch, also fixes bug 393884
OK, r=me with comment #10 fixed.
Attachment #351248 -
Flags: review?(neil) → review+
Assignee | ||
Comment 12•16 years ago
|
||
Attachment #357801 -
Flags: superreview?(neil)
Attachment #357801 -
Flags: review?(neil)
Updated•16 years ago
|
Attachment #357801 -
Flags: superreview?(neil)
Attachment #357801 -
Flags: superreview+
Attachment #357801 -
Flags: review?(neil)
Attachment #357801 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
Updated•16 years ago
|
Attachment #357801 -
Flags: approval1.9.1?
Comment 13•16 years ago
|
||
Comment on attachment 357801 [details] [diff] [review]
like so? also adds a button test
[Checkin: Comment 16]
I'd like to see this in 1.9.1, calendar could make use of this patch.
Assignee | ||
Comment 14•16 years ago
|
||
(In reply to comment #13)
> (From update of attachment 357801 [details] [diff] [review])
> I'd like to see this in 1.9.1, calendar could make use of this patch.
Phillip, can you explain what UI or feature would make use of this?
Comment 15•16 years ago
|
||
Not blocking. Enn says he doesn't think we want this for 1.9.1, but wants to know why calendar wants/needs it.
Flags: blocking1.9.1? → blocking1.9.1-
Updated•16 years ago
|
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
Updated•16 years ago
|
Attachment #351248 -
Attachment is obsolete: true
Comment 16•16 years ago
|
||
Comment on attachment 357801 [details] [diff] [review]
like so? also adds a button test
[Checkin: Comment 16]
http://hg.mozilla.org/mozilla-central/rev/31d411bd26bc
Attachment #357801 -
Attachment description: like so? also adds a button test → like so? also adds a button test
[Checkin: Comment 16]
Updated•16 years ago
|
Attachment #350769 -
Attachment is obsolete: true
Comment 17•16 years ago
|
||
From the point of view of just making XUL apps more capable on 1.9.1 I'd like to see this on branch.
Updated•16 years ago
|
Attachment #357801 -
Flags: approval1.9.1? → approval1.9.1+
Comment 18•16 years ago
|
||
Comment on attachment 357801 [details] [diff] [review]
like so? also adds a button test
[Checkin: Comment 16]
a191=beltzner
Comment 19•16 years ago
|
||
Keywords: fixed1.9.1
Comment 20•13 years ago
|
||
Documentation for this should be added to:
https://developer.mozilla.org/en/XUL/toolbarbutton#a-toolbarbutton.type
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•