Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-72966

Embedded svg icon causes browser to hang (javascript problem)

Details

    • Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • 7.0.2 CE GA3, 7.0.0 DXP FP12
    • Master
    • 3
    • UX / Visual - Desktop

    Description

      At least some SVG icons cause the browser window to hang when they are embedded into a page. The page becomes totally unresponsive and after a short while the browser ask if you want to stop the malfunctioning script. We noticed this issue when tried to embed icons in our theme using grunticon (Grunticon is a very common build tool).

      Affected browsers (at least): Firefox, Chrome

       

      We found the following simple steps to reproduce:

      1) Start Liferay and log in as administrator
      2) Create a new, empty page
      3) Add a webcontent display to the page
      4) Add webcontent, switch to source code view and insert the attached text into the webcontent. Note: An svg file is just a text file, you can open it and copy the text into the sourcecode window.

      5) Save webcontent and close editor

       

      Result: The page is unresponsive and hangs.
      Debugging the script shows that the following function causes the problem:

         function svg4everybody(opts) {

       

      Attachments

        1. 70ee.PNG
          70ee.PNG
          353 kB
        2. FP18.PNG
          FP18.PNG
          392 kB
        3. ic-top-news.svg
          1 kB
        4. master.PNG
          master.PNG
          348 kB
        5. p.PNG
          p.PNG
          69 kB
        6. SP2.PNG
          SP2.PNG
          392 kB

        Activity

          People

            support-lep@liferay.com SE Support
            crabel Christoph Rabel
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 27 weeks, 5 days ago

              Packages

                Version Package
                Master