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

Provide alternative for browser native dialogs when Liferay is rendered in cross-domain iframes

    Details

    • Epic/Theme:
    • Story Points:
      1
    • Main Core Job:
      Engage - Inform Users
    • Epic Status:
      To Do
    • Sprint:
      S05E01 - Dark Souls, S05E02 - Path of Exile, S05E03 - Tibia, S05E04 - Half Life

      Description

      On march 2020, chomium launched a proposal to deprecate browser native dialogs alert(), confirm() and prompt(), when the code creating them runs embedded in a frame and was loaded from a different origin than the host page. Proposal led to a big discussion about the apropriateness of removing such support, still active at the time of this writing.

      Current situation can be summarized as follows:

      As a result, once chrome rolls out this, customers rendering Liferay in a cross-domain iframe would not get browser native dialogs rendered. This will break some DXP features.

      The goal of this epic is to design and implement alert and confirmation dialogs that substitute the native ones, so that DXP can render properly both in the main frame and within a cross-domain iframe. 

      Acceptance criteria:

      • DXP provides globally available functions to substitute the existing ones. These should be included in all served pages so that they can be called from anywhere in DXP codebase
      • All occurrences of browser native dialogs alert(), confirm() and prompt() in DXP codebase are properly substituted with the new functions
      • New functions must offer a similar UX as the existing ones.
      • Solution must not cause side effects on DXP applications, regardless of how the DXP app is being rendered. This includes, but is not limited to:
        • CSP configurations needed to execute the functions
        • Native functions block the JS main thread. New solution may not be doing this in all cases
      • Solution must work for all liferay versions with active Premium Support. As per this list, this includes Liferay 7.1 onwards
      • To enable a smooth transtion, new functions will be gated trhough a FF so that they can behave like the traditional dialogs

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              bruno.fernandez Bruno Fernández
              Recent user:
              Daniel Sanz
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package