BUTTON element retains visual focus after press, change of focus

VERIFIED FIXED in M7

Status

()

P3
normal
VERIFIED FIXED
20 years ago
20 years ago

People

(Reporter: cpratt, Assigned: peterl-retired)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

20 years ago
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).

Updated

20 years ago
Assignee: troy → karnaze

Updated

20 years ago
Assignee: karnaze → evaughan

Updated

20 years ago
Status: NEW → ASSIGNED

Updated

20 years ago
QA Contact: 4110 → 4137

Comment 1

20 years ago
Reassigning bug to cpratt@netscape.com (FORM related).

Updated

20 years ago
Target Milestone: M7

Comment 2

20 years ago
targeting for m7

Updated

20 years ago
Assignee: evaughan → joki
Status: ASSIGNED → NEW

Comment 3

20 years ago
Focus is not currently implemented.

Updated

20 years ago
Assignee: joki → evaughan

Comment 4

20 years ago
Focus pseudo styles should work now.  Assigning back to you.

Updated

20 years ago
Assignee: evaughan → joki

Comment 5

20 years ago
This is in your hands now. I get all focus from CSS now.

Updated

20 years ago
Assignee: joki → evaughan

Comment 6

20 years ago
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>

Updated

20 years ago
Assignee: evaughan → peterl

Comment 7

20 years ago
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
(Assignee)

Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 8

20 years ago
Fixed ReResolveStyleContext in button frame to change pseudo element style and
capture change information properly.
(Reporter)

Comment 9

20 years ago
Not fixed in the 1999061608 build under NT. What build should this be fixed in?
(Assignee)

Comment 10

20 years ago
This fix was checked in last night around 11:00pm. ReVerifyed that it's still
working for me. Try first M7 candidate build.
(Reporter)

Updated

20 years ago
Whiteboard: JUN18: Still don't see the fix... investigating...
(Reporter)

Updated

20 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 11

20 years ago
OK, got it. Verified in 1999070608 build, NT.
You need to log in before you can comment on or make changes to this bug.