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

Web content with ddm-image fields preview: escape key only works on the 1st image.

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 7.3.X
    • 7.3.X
    • Alloy UI

    Description

      Steps to reproduce:

      1. login as admin and go to Content & Data → Web Content → Structures
      2. create a structure with at least 2 ddm-image fields
      3. create a web content that uses this structure
      4. on the web content creation form, choose one image for each field
      5. click on the "Preview" button of the 1st image: image is displayed using image-preview layer
      6. hit the "escape" key: image preview is closed
      7. click on the "Preview" button of the 2nd image: image is displayed using image-preview layer

      Actual behavior:

      • hitting the "escape" key has no effect

      Expected behavior:

      • hitting the "escape" key closes the image preview

      Reproduced on:

       7.3.10-dxp-3

       7.3.x-private @ 2482ee299e9ac76c40fadb6b4e242722ddf98af0

      Master is using data-engine, the issue is not applicable

      Rootcause:
      The problem is we are creating the event listener for the keydowns on the doc 
      https://github.com/liferay/alloy-ui/blob/master/src/aui-image-viewer/js/aui-image-viewer.js#L94
      This won't work well for multiple instances

      Attachments

        Issue Links

          Activity

            People

              sme-frontend-infra SME Frontend Infrastructure
              norbert.nemeth Norbert Németh
              Kiyoshi Lee Kiyoshi Lee
              Norbert Németh Norbert Németh
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                16 weeks ago

                Packages

                  Version Package
                  7.3.X