Closed Bug 287616 Opened 20 years ago Closed 20 years ago

[FIXr]need three clicks to open a colorpicker with type=button

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: mvl, Assigned: bzbarsky)

Details

Attachments

(2 files)

For a colorpicker with the type set to button, i need hree click to open it when the focus before starting to try to open it is on a textfield. This is a regression, i'm working on a timeframe.
Attached file testcase
The testcase is simple. Just focus the textfield, and then try to open the colorpicker.
by downloading builds from archive.mozilla.org, i have the following window: 2005012710 works 2005012805 fails (gtk1 builds, but i originally found this using gtk2)
from bonsai, i see two checkins that might have cause this: bug 261238 and maybe bug 279308 cc-ing patch authors.
This is indeed caused by bug 279308. I removed the changes in nsPopupSetFrame.cpp, and then i only needed one click, like it should. (but i new get warnings on the console, so just backing out that part isn't the fix)
OK, this is a problem only in the classic theme, as far as Neil and I can tell. And if I make the "open" attribute change sync, the issue seems to go away. This attribute is being set on the <colorpicker> element. Also, the popup does open (click, then hit the right arrow key to see this, say). It just doesn't reallly render for some reason. So what does the classic theme do specially with the "open" attribute compared to modern? I tried messing with the classic colorpicker.css to make it be more like modern, but that didn't help. Looking at what style changes are associated with the "open" attribute on colorpicker, I can't see why there would possibly be an issue here....
Flags: blocking1.8b2?
Flags: blocking-aviary1.1?
It's odd that commenting out lines 63-77 of Classic's colorpicker.css should make any difference as Modern actually has more css rules, not fewer.
Does removing those lines in fact help?
commenting out those lines does fix the bug. Commenting out one of the two blocks doesn't. You need them removed both. Also, using modern fixes this problem. But copying the colorpicker.css from modern over classic version does not fix it. (although the picked does look blue and modern) Maybe somehow related to the textfield? Because if you forgot to focus it, you also only need one click.
indeed, removing -moz-appearance: textfield; from textbox.css fixes the problem. (the modern of textbox.css doesn't have it in the first place)
Attached patch Proposed patchSplinter Review
The exact testcase for this bug got "fixed" by bug 288365 (presumably because that changed ordering around somewhere, somehow). But the real problem, in my opinion, is that style changes are processed asynchronously while rendering changes due to widget state changing are synchronous. This patch fixes the latter to just follow the async codepath that style changes follow. I tested that this fixes the issue even in a build in which ApplyRenderingChangeToTree does a DEFERRED batch.
Assignee: jag → bzbarsky
Status: NEW → ASSIGNED
Attachment #180492 - Flags: superreview?(roc)
Attachment #180492 - Flags: review?(roc)
Priority: -- → P3
Summary: need three clicks to open a colorpicker with type=button → [FIX]need three clicks to open a colorpicker with type=button
Target Milestone: --- → mozilla1.8beta3
Attachment #180492 - Flags: superreview?(roc)
Attachment #180492 - Flags: superreview+
Attachment #180492 - Flags: review?(roc)
Attachment #180492 - Flags: review+
Summary: [FIX]need three clicks to open a colorpicker with type=button → [FIXr]need three clicks to open a colorpicker with type=button
Comment on attachment 180492 [details] [diff] [review] Proposed patch Requesting 1.8 approval... This one has a little bit of risk, but I think overall making this follow the normal restyle codepath should make things more reliable.
Attachment #180492 - Flags: approval1.8b2?
Comment on attachment 180492 [details] [diff] [review] Proposed patch a=asa
Attachment #180492 - Flags: approval1.8b2? → approval1.8b2+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.8beta3 → mozilla1.8beta2
Flags: blocking1.8b2?
Flags: blocking-aviary1.1?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: