Closed
Bug 863702
Opened 12 years ago
Closed 11 years ago
[B2G] :active state is sometime not rendered if you tap quickly
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: rik, Assigned: vingtetun)
References
Details
Attachments
(1 file, 2 obsolete files)
3.77 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
When taping an item that has an :active state, if you do it really fast, the :active rules will not be rendered. Because of that, users can think that a tap was not registered and tap a second time or think the app is not reactive.
I think we should let :active be "active" for a certain amount of time (to be determined). If the user taps another element, we should switch the :active state immediately to that new element.
So the way I could imagine this working is that we'd extend :active applying after the mouseup until either:
(a) a pref-controlled number of milliseconds since mouse*down* have elapsed, or
(b) there's another mousedown
Component: Layout: View Rendering → CSS Parsing and Computation
Assignee | ||
Comment 2•11 years ago
|
||
The patch at https://bug921824.bugzilla.mozilla.org/attachment.cgi?id=811675 will fix it. I don't really like it tbh because it spin the event loop and delay the mouse events sequence. And because there are delayed the :active class last longer.
Now, even if I don't like it it may worth it since it won't delayed touch events and will improve a lot the feeling of the device, both in terms of reliability and responsiveness.
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #813852 -
Flags: review?(fabrice)
Assignee | ||
Updated•11 years ago
|
Blocks: fix-blue-highlight
Updated•11 years ago
|
Attachment #813852 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 7•11 years ago
|
||
Backed out for B2G mochitest-2 failures.
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb0f1d1bd9ca
https://tbpl.mozilla.org/php/getParsedLog.php?id=28994591&tree=Mozilla-Inbound
Assignee: nobody → ryanvm
Updated•11 years ago
|
Assignee: ryanvm → 21
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #6)
> Not until it hits m-c :)
Oups! sorry about that. And followed by a backout!
Assignee | ||
Comment 9•11 years ago
|
||
Let's not break clicks...
Attachment #813852 -
Attachment is obsolete: true
Attachment #816655 -
Flags: review?(fabrice)
Comment 10•11 years ago
|
||
Comment on attachment 816655 [details] [diff] [review]
bug863702.patch
Review of attachment 816655 [details] [diff] [review]:
-----------------------------------------------------------------
Can you send this one to try? Meanwhile I'll try to thing about a less ugly solution.
::: dom/browser-element/BrowserElementPanning.js
@@ +78,5 @@
> return;
> }
>
> + var start = Date.now();
> + var thread = Services.tm.currentThread;
s/var/let
@@ +82,5 @@
> + var thread = Services.tm.currentThread;
> + while (this._block && (Date.now() - start) < this._activeDurationMs) {
> + thread.processNextEvent(true);
> + }
> + this._block = false;
'_block' is a bit too generic. And oh, the evil of spinning the event loop :(
@@ +240,5 @@
> + this.notify(this._activationTimer);
> +
> + this._block = true;
> + var start = Date.now();
> + var thread = Services.tm.currentThread;
here too
Attachment #816655 -
Flags: review?(fabrice) → feedback+
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #10)
> Comment on attachment 816655 [details] [diff] [review]
> bug863702.patch
>
> Review of attachment 816655 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Can you send this one to try?
Sure I don't want to break events again :)
> Meanwhile I'll try to thing about a less ugly
> solution.
>
If you can I will be more than happy. But tbh I think this kind of code is why people have learned to use touch events to be fast on mobile devices. I bet that other vendors are doing something similar in the background.
Assignee | ||
Comment 12•11 years ago
|
||
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Vivien Nicolas (:vingtetun) (:21) from comment #12)
> https://tbpl.mozilla.org/?tree=Try&rev=67dbaf45fbac
Seems green.
Assignee | ||
Comment 14•11 years ago
|
||
Attachment #816655 -
Attachment is obsolete: true
Attachment #817878 -
Flags: review?(fabrice)
Updated•11 years ago
|
Attachment #817878 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 15•11 years ago
|
||
Comment 16•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•