Closed Bug 788379 Opened 12 years ago Closed 12 years ago

Anchor elements turn orange (and stay orange) when clicked

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(firefox15 affected, firefox16 affected, firefox17 affected, firefox18 verified, fennec+)

VERIFIED FIXED
Firefox 18
Tracking Status
firefox15 --- affected
firefox16 --- affected
firefox17 --- affected
firefox18 --- verified
fennec + ---

People

(Reporter: cscott, Assigned: kats)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.7) Gecko/20100101 Firefox/10.0.7 Iceweasel/10.0.7
Build ID: 20120829094104

Steps to reproduce:

The following website has four colored buttons at the bottom of the screen, colored using background-color in CSS:
  http://nell-balloons.github.cscott.net/
Click on the throbbing button first to start the game, then look at the four colored buttons.
Clicking on the button in a desktop browser (firefox, chrome, etc) applies a transient "darkening" effect (using a transparent background-image) and then restores the color to its original value.


Actual results:

On Firefox for Android Aurora, the button turns orange when it is tapped, and stays orange until another button is tapped.


Expected results:

The button shouldn't turn orange.

This seems to be related to the "vitamin-c" focus highlight, but nothing I've tried (adding !important CSS rules for :active and :focus; setting tap-highlight-color and -moz-tap-highlight-color; setting -moz-user-focus:ignore) seems to turn off this behavior.
Can you provide a simplified test case that reproduces this behaviour? It will be much easier to debug if you create a smaller test page with just the buttons and the clicking behaviour.
Status: UNCONFIRMED → NEW
Ever confirmed: true
http://dev.laptop.org/~cscott/nell-balloons/bug.html is a somewhat simplified test.  The event listeners seem to be required to get the highlight to show up (and persist).
tracking-fennec: --- → ?
tracking-fennec: ? → +
It's been suggested that this might be related to bug 779096?
I doubt it. I suspect this is just a problem with our touch listener logic. In this case you're calling preventDefault on the touch event which means no mouse events get sent to the page as well as none of the messages from panzoomcontroller to tell gecko to hide the highlight. I think best we can do is send a message back to java telling it to cancel the tap highlight whenever we receive the preventDefault call in Java.
Attached patch PatchSplinter Review
I agree with what wesj said in comment #4. This probably regressed because of bug 773431; prior to that we would just not run the touchstart handler in browser.js at all if content did a preventDefault on the touch event.

The attached patch ensures that we send the Gesture:CancelTouch event to browser.js from java even in the preventDefault case, which removes the highlight.
Attachment #659005 - Flags: review?(wjohnston)
Assignee: nobody → bugmail.mozilla
Attachment #659005 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/28b674d2bbe4
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Verified fixed via posted demo on mozilla-central (09/12).

cscott, feel free to try this out in Nightly (09/12).
Status: RESOLVED → VERIFIED
Yup, confirmed fixed on nightly.  Thanks!
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: