Closed Bug 3290 Opened 26 years ago Closed 25 years ago

BUTTON element retains visual focus after press, change of focus

Categories

(Core :: Layout, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cpratt, Assigned: peterl-retired)

References

()

Details

(Whiteboard: JUN18: Still don't see the fix... investigating...)

Sample HTML code for this is: <form action="mailto:Kligor.T@gee.whiz.com"> <p>The following line contains a text input control. <p><input type=text> <p>The following line contains a button. <p><button>Click here to submit this form.</button> </form> This creates a form with a button that can be pressed to submit the form. However, after pressing on the form, the thin grey dashed line around the border of the button (which presumably indicates that it has been pressed) does not go away even when focus is switched back to the text field. I would expect the button to revert to its pre-pressed look (ie no thin grey line around its edges).
Assignee: troy → karnaze
Assignee: karnaze → evaughan
Status: NEW → ASSIGNED
QA Contact: 4110 → 4137
Reassigning bug to cpratt@netscape.com (FORM related).
Target Milestone: M7
targeting for m7
Assignee: evaughan → joki
Status: ASSIGNED → NEW
Focus is not currently implemented.
Assignee: joki → evaughan
Focus pseudo styles should work now. Assigning back to you.
Assignee: evaughan → joki
This is in your hands now. I get all focus from CSS now.
Assignee: joki → evaughan
So I slightly modified the test case to use a simple button focus rule and it works just great. The problem seems to be slightly lower, possibly the style system. cc'ing peterl and giving bug to evaughan for a quick test to see if its his or peter's. New test case: <html> <body> <style type="text/css"> BUTTON:focus { background-color: aqua} </style> <form action="mailto:joki@netscape.com"> <p>The following line contains a text input control. <p><input type=text> <p>The following line contains a button. <p><button>Click here to submit this form.</button> </form> </body> </html>
Assignee: evaughan → peterl
Peter, This happend because the focus border is a pseudo element. It works like this: button { // draw normally } button:focus:-moz-inner-focus { // a dotted line (At least on windows) } In Reresolve style the button goes out and gets the pseudoelement. If its not in focus then the pseudoelement is empty. If it is then it picks up the dotted line. Unfortunately when the button's state is changed to "focus" Reresolve is not called because the style system thinks nothing changed in the style context. Which is true but a pseudo element was added. I would think the style system should Reresolve in this case. Let me know what your take is on this. -E
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed ReResolveStyleContext in button frame to change pseudo element style and capture change information properly.
Not fixed in the 1999061608 build under NT. What build should this be fixed in?
This fix was checked in last night around 11:00pm. ReVerifyed that it's still working for me. Try first M7 candidate build.
Whiteboard: JUN18: Still don't see the fix... investigating...
Status: RESOLVED → VERIFIED
OK, got it. Verified in 1999070608 build, NT.
You need to log in before you can comment on or make changes to this bug.