Bug 174562 - :active pseudo-class matches after mouse button has been released
Summary: :active pseudo-class matches after mouse button has been released
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks: 174563
  Show dependency treegraph
 
Reported: 2017-07-16 06:40 PDT by Antoine Quint
Modified: 2019-08-23 06:26 PDT (History)
11 users (show)

See Also:


Attachments
Testcase (218 bytes, text/html)
2017-07-16 06:40 PDT, Antoine Quint
no flags Details
Patch (1.23 KB, patch)
2017-07-20 14:54 PDT, Per Arne Vollan
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2 (18.90 MB, application/zip)
2017-07-20 19:02 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2017-07-16 06:40:31 PDT
Created attachment 315604 [details]
Testcase

See the attached testcase, click on the blue rectangle, and notice how remains red after you've clicked even though the :active pseudo-class should no longer be matching and the background-color should have reverted back to blue. Everything clears out if you move the mouse pointer or hit a key.
Comment 1 Radar WebKit Bug Importer 2017-07-16 06:41:02 PDT
<rdar://problem/33340162>
Comment 2 Antoine Quint 2017-07-16 06:44:22 PDT
This is the cause for https://bugs.webkit.org/show_bug.cgi?id=174563.
Comment 3 Simon Fraser (smfr) 2017-07-16 21:15:54 PDT
Doesn't occur in an old build. Can you autospade it?
Comment 4 Simon Fraser (smfr) 2017-07-16 21:23:13 PDT
Might be a system regression.
Comment 5 Antoine Quint 2017-07-17 03:05:56 PDT
I haven't been able to autospade on Sierra, but Simon told me offline that a nightly build on Sierra didn't show the issue, so it's likely a regression in a framework WebKit depends on in High Sierra.
Comment 6 Per Arne Vollan 2017-07-20 14:54:19 PDT
Created attachment 316028 [details]
Patch
Comment 7 Per Arne Vollan 2017-07-20 14:55:13 PDT
(In reply to Per Arne Vollan from comment #6)
> Created attachment 316028 [details]
> Patch

I will add a test.
Comment 8 Simon Fraser (smfr) 2017-07-20 15:07:16 PDT
Comment on attachment 316028 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=316028&action=review

I don't think we should land this yet.

> Source/WebCore/ChangeLog:4
> +        https://bugs.webkit.org/show_bug.cgi?id=174562

Need a radar here.
Comment 9 Build Bot 2017-07-20 19:02:19 PDT
Comment on attachment 316028 [details]
Patch

Attachment 316028 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4158450

New failing tests:
imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html
Comment 10 Build Bot 2017-07-20 19:02:21 PDT
Created attachment 316057 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 11 Darin Adler 2017-07-23 13:44:05 PDT
Comment on attachment 316028 [details]
Patch

Is there a way to do regression tests?
Comment 12 Per Arne Vollan 2017-07-24 07:31:30 PDT
(In reply to Darin Adler from comment #11)
> Comment on attachment 316028 [details]
> Patch
> 
> Is there a way to do regression tests?

I have a work-in-progress test, but the following event sender calls seem to throw a JavaScript exception:

    eventSender.addTouchPoint(50, 50);
    eventSender.touchStart();

I will look further into this.

Thanks for reviewing, all!
Comment 13 jeremiegirault+webkit 2017-12-26 05:43:14 PST
Hi,

I'm a user and suffering from this bug.
I played a lot to try to find a workaround so there are some elements I found, hope that will help you :

- It does not happen inside iframes
- It only happens when the following trackpad option is set in the settings:
  - [x] force click and haptic feedback (settings -> trackpad -> first tab "point and click", in the bottom "force click")
- disabling force click in javascript (by preventing default of webkitmouseforcewillbegin) does not help ( https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html)

Thanks,

Configuration:
- safari 11.0.2
- macos 10.13.2
- macbook pro 15' 2017
Comment 14 Antoine Quint 2019-08-23 06:26:57 PDT
This no longer occurs with STP 90, at least on macOS Catalina.