[Webkit-unassigned] [Bug 161913] New: embedded SVG is reloaded when css @media breakpoint changes layout

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 13 10:18:34 PDT 2016


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

            Bug ID: 161913
           Summary: embedded SVG is reloaded when css @media breakpoint
                    changes layout
    Classification: Unclassified
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: spamfaenger at gmx.de
                CC: zimmermann at kde.org

Created attachment 288694
  --> https://bugs.webkit.org/attachment.cgi?id=288694&action=review
reproducer

I noticed this bug when trying to build a responsive display of game scores. The problem as far as I can tell, seems to be:

* When resizing the main window so that the @media rule for the width (767px) is triggered
* The SVG is suddenly reloaded by the browser
* And therefore looses all state it had assigned in the DOM

In my reduction of this problem, please observe all of the following:
* The onLoad handler is called multiple times, as visible by the logging statement in it
* When you resize the window, the gage-pointer should become invisible once you cross the @media rule

I have guarded the code inside this handler, to only actually manipulate the SVG on the first call. This simulates that the user-interaction changes state in the SVG that is lost on reload <- THIS IS THE BUG!!!!

The workaround is to externally save all state, and then reapply it when onload is called again (this is quite a pain in the butt!)

I have observed this bug in Safari (Version 9.1.3 (11601.7.8) and Technology Preview Edition Release 12 (Safari 9.1.2, WebKit 11603.1.3)) and in Chromium (nightly Version 51.0.2683.0 (64-bit)).

Firefox (latest) does not (seem to) exhibit this bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160913/670620d7/attachment-0001.html>


More information about the webkit-unassigned mailing list