[Webkit-unassigned] [Bug 199708] New: history.back/forward does not trigger the popstate event synchronously

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 11 06:15:14 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=199708

            Bug ID: 199708
           Summary: history.back/forward does not trigger the popstate
                    event synchronously
           Product: WebKit
           Version: Safari 12
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: History
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: 709922234 at qq.com

Steps to reproduce the problem:
1. open https://www.google.com
2. open webconsole
3. input 
```
  history.pushState("/", {}, "");
  let flag = false;
  window.addEventListener("popstate", () => {
    console.log({ flag });
  });
  flag = true;
  history.back();
  queueMicrotask(() => (flag = false));
```

What is the expected behavior?
output `{ flag: true }`

What went wrong?
output `{ flag: false }`

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190711/f88ee002/attachment.html>


More information about the webkit-unassigned mailing list