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

Loading animation in modal does not stop after embedded page is partially blocked by browser's same-origin policy

    Details

      Description

      Reproduction steps:

      1) Open the browser console on a page of Liferay DXP 7.1 Portal with the classic theme.

      2) Paste the following code in the console and run:

      Liferay.Util.openWindow( 
       { 
       dialog: { 
       centered: true, 
       cssClass: 'springboard-modal-window', 
       modal: true, 
       width: 700 
       }, 
       title: "Test iframe", 
       uri: "http://www.w3.org/1999/xhtml" 
       } 
       );

       

      Current behavior:
      After the embedded page in modal is partially loaded in the background, although the loader animation stays in the foreground and 'freeze' the window. Also, an error appears in the console: 
      Uncaught DOMException: Blocked a frame with origin "http://localhost:8080" from accessing a cross-origin frame.

      Expectations:

      If the modal can not be loaded for some error it shold be informed with the user.

       

      Additional resources for this issue:
      https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
      https://stackoverflow.com/questions/25098021/securityerror-blocked-a-frame-with-origin-from-accessing-a-cross-origin-frame

      Reproduced on:
       DXP 7.1 SP1
       7.1.x @ f8ab24806156c81f7db9a7ccb6ff7345c55bcf77
       master-private @ ae556a3047d963040004456b0c58d2eb6d15381d

       

      In this case the browser is blocking the frame with cross-origin and the loader icon i still visible and a DOMException happens in the console.
      However the user will expect an notice about this behaviour without any JS error.

       

        Attachments

          Activity

            People

            • Assignee:
              summer.zhang Summer Zhang
              Reporter:
              roland.pakai Roland Pákai
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 weeks, 6 days ago