Bug 196245 - SVG loses event handlers on navigating back
Summary: SVG loses event handlers on navigating back
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-26 03:20 PDT by Martin Häcker
Modified: 2019-03-28 11:49 PDT (History)
5 users (show)

See Also:


Attachments
reduction (35.12 KB, application/zip)
2019-03-26 03:20 PDT, Martin Häcker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Häcker 2019-03-26 03:20:29 PDT
Created attachment 365956 [details]
reduction

How to reproduce:

* download attached reduction
* serve content via http server. Possibly like this:
    % unzip svg-bug.zip 
    % cd svg-bug 
    % python3 -m http.server
* open localhost:8000 (or whatever python tells you) in the browser
* click on any one of the three round button-y things to trigger a navigation
* navigate back via the back button, mouse gesture or command-leftarrow
* try to click any of the buttons again to trigger another navigation.
* observe that nothing happens
* navigating forward shows the same behavior on the second page

What seems to happen:
I'm not exactly sure I've seen all the bugs, but at least the js event handlers are not attached anymore after the page is loaded from the navigation cache (or however it's called). In addition to that (but not quite reducible) I have seen that the entire svg is hidden on navigating back - but I can't reliably reproduce that.

Proposed solution: If the page is served from a fast cache that makes no JS execute again on returning to the previous page, then that page needs to retain all the js event handlers - or it needs to trigger an actual reload.
Comment 1 Radar WebKit Bug Importer 2019-03-28 11:49:55 PDT
<rdar://problem/49388845>