Closed Bug 1349646 Opened 7 years ago Closed 6 years ago

Parts of focus outline stay visible when tabbing between buttons on html page

Categories

(Core :: Layout: Form Controls, defect)

53 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla61
Tracking Status
firefox52 --- unaffected
firefox-esr52 --- unaffected
firefox-esr60 --- wontfix
firefox53 --- wontfix
firefox54 --- wontfix
firefox55 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- verified

People

(Reporter: 684sigma, Assigned: hiro)

References

(Blocks 1 open bug)

Details

(Keywords: polish, regression, testcase)

Attachments

(5 files)

I have a problem with Firefox Beta 53. It also happens on Nightly 55. It doesn't happen in Beta 52, ESR 45.
When I repeatedly focus buttons in devtools by mouse, parts of focus outline stay visible. It also happens on HTML pages.
Here's how to reproduce it

1. Open attached web page
2. Press Tab several times to focus 1st button, then 2nd button, and so on.

Result: parts of focus outline stay visible
Expected: outline of not focused buttons should disappear
Has STR: --- → yes
Keywords: regression
Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=9ff9b1aa382fb49983785d9831b80100a36ecb71&tochange=bd30cdbf03c342fc16fe21921e82515ef0a27d45
Blocks: 140562
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Form Controls
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
Has Regression Range: --- → yes
Attached file reduced testcase
Too late for a fix for 53, as we are heading into the last week of the beta 53 cycle and no one is assigned.
Gonna mass wontfix, given the polishy nature of this bug (and the fact that nobody seems to be investigating).
Likely introduced by bug 140562. Thomas, could you take a look?
Flags: needinfo?(wisniewskit)
It isn't reproducing for me on today's nightly or 59.0.2, but when I tried a build from a year ago it did exhibit the issue. According to Mozregression it was fixed in bug 1367690.
Flags: needinfo?(wisniewskit)
Thank you for taking a look! Let's close this as fixed by bug 1367690. If someone can still reproduce, please open a new bug.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
It still reproduces for me in today's Nightly if you don't select each button in order but alternate back and forwards.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Hi Thomas can you please try clicking the buttons in rand order.

For example with either attachment 8850128 [details] or attachment 8851223 [details] I can reproduce by clicking buttons in order: 1, 4, 3, 7.
Flags: needinfo?(wisniewskit)
Ah yes, I can reproduce it somewhat when clicking randomly. I also noticed that once I click off of the line of buttons to unfocus all of them, any lingering artifacts are cleared as well.

I'm afraid that I'm not familiar enough with how these things are rendered to know what might be causing it, though...
Flags: needinfo?(wisniewskit)
I will look into this.
Flags: needinfo?(hikezoe)
From bug 140562 comment 48;

> - ensures that the -moz-focus-inner frame's border is just inside the button's border+padding, so they won't overlap (with the margin possibly tweaking it).

If I understand correctly this, we should clamp inner focus padding to button's padding in the case where the inner focus padding is bigger than the button padding.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=1117d43d39d33f24120810300712456111ff92d8
Flags: needinfo?(hikezoe)
BaseMargin::Clamp which was introduced in the try (in comment 15) might be overdoing for this purpose (it's inspired by BasePoint::Clamp though).  We just need to use std::min there for each factor in nsMargin.

Here is a new try;
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f158e26cabe4108d2d9de6b60f7f53203249e9b5
Hiro, were you going to put this up for review?
Flags: needinfo?(hikezoe)
Flags: needinfo?(hikezoe)
Attachment #8965920 - Flags: review?(wisniewskit)
Attachment #8965921 - Flags: review?(wisniewskit)
Did I put a wrong nickname?
Friendly review ping?
Flags: needinfo?(wisniewskit)
Comment on attachment 8965921 [details]
Bug 1349646 - Don't overflow -moz-inner-focus border.

https://reviewboard.mozilla.org/r/234728/#review243596
Attachment #8965921 - Flags: review?(wisniewskit) → review+
Sorry for the delay on the review! This seems fine to me and I've given it an r+ on reviewboard, but I'm not sure if my r+ will be sufficient for landing.
Flags: needinfo?(wisniewskit)
Thanks! 
There is one more patch (attachment 8965920 [details]), it's just a typo fix though.
Assignee: nobody → hikezoe
Status: REOPENED → ASSIGNED
Comment on attachment 8965920 [details]
Bug 1349646 - s/-moz-inner-focus/-moz-focus-inner/.

https://reviewboard.mozilla.org/r/234726/#review243602
Attachment #8965920 - Flags: review?(wisniewskit) → review+
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee12eb319b24
s/-moz-inner-focus/-moz-focus-inner/. r=wisniewskit+471096
https://hg.mozilla.org/integration/autoland/rev/1b149844d700
Don't overflow -moz-inner-focus border. r=wisniewskit+471096
https://hg.mozilla.org/mozilla-central/rev/ee12eb319b24
https://hg.mozilla.org/mozilla-central/rev/1b149844d700
Status: ASSIGNED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
I have reproduced this issue using Firefox  60.0a1 (2018.03.02) on Ubuntu 14.04 x64.
I can confirm this issue is fixed, I verified using Firefox 61.0b9 on Win 10 x64, Mac OS X 10.13 and Ubuntu 14.04 x64.
Status: RESOLVED → VERIFIED
Timea, thanks for the confirmation!
You need to log in before you can comment on or make changes to this bug.