Bug 246313 - The second pointerdown/touchstart event is missing on double-tap gesture
Summary: The second pointerdown/touchstart event is missing on double-tap gesture
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-10 19:39 PDT by weijarz
Modified: 2022-11-04 20:34 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description weijarz 2022-10-10 19:39:17 PDT
To reproduce:

https://www.oxyry.com/test/safari-double-tap-bug/safari-double-tap-bug.html

1. Open the url in safari
2. Add this webpage to Home Screen (REQUIRED!!!)
3. Open this webpage from Home Screen icon.
4. Double tap black area, only one pointerdown/touchstart event will be triggered!

Note: Open it in Safari browser is working properly.


Full source:
```
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
    <title>Safari double tap bug</title>

    <link rel="manifest" href="manifest.json">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">

    <style>
      #rootEl {
        height: 70vh;
        overflow: auto;
        background: #000;
        color: #fff;
        /* touch-action: none; */
        user-select: none;
      }
    </style>
  </head>
  <body>
    <div>
      <div id="rootEl"></div>
      <p id="btns">
        <button id="clearBtn">Clear</button>
        <button id="reloadBtn">Reload</button>
      </p>
    </div>
    <script>
      clearBtn.onclick = () => { rootEl.innerHTML = ''; }
      reloadBtn.onclick =  () => { location.reload(); }

      const log = (msg) => {
        const m = document.createElement('div')
        m.textContent = msg
        rootEl.appendChild(m)
      }

      let i = 0
      rootEl.addEventListener('pointerdown', () => {
        log(`pointerdown #${i++}`)
      })

      let j = 0
      rootEl.addEventListener('touchstart', (ev) => {
        log(`touchstart #${j++}`)
        // ev.preventDefault()
      })
    </script>
  </body>
</html>

```
Comment 1 Radar WebKit Bug Importer 2022-10-17 19:40:18 PDT
<rdar://problem/101273397>
Comment 2 Richard Robinson 2022-11-03 14:39:46 PDT
Pull request: https://github.com/WebKit/WebKit/pull/6101
Comment 3 EWS 2022-11-04 20:34:16 PDT
Committed 256348@main (6115b3860098): <https://commits.webkit.org/256348@main>

Reviewed commits have been landed. Closing PR #6101 and removing active labels.