Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-19430

eZImageEditor: Shortcut-key indicator grows every time the editor is opened

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Low Low
    • Resolution: Duplicate
    • Affects Version/s: 4.5.0, 4.7.0-dev
    • Labels:
      None
    • Environment:

      Operating System: RHEL 62
      PHP Version: 5.3.3
      Database and version: MySQL 5.1.61
      Browser (and version): firefox 12.0, google-chrome 18.0.1025.168, chromium 18.0.1025.168 (Developer Build 134367 Linux)

      Description

      The eZ Image Editor main window features a list of tools on the left, hovering over each tool will display its name and, if available, a keyboard shortcut for said tool between parenthesis. For example: *Sepia (p)*

      Currently, if you open the image editor window, close it, and reopen it, the shortcut indication is once again appended to the end of the tool's title, so for example, the Sepia example above now becomes: *Sepia (p) (p)*

      Close the window one more time, re-open it, the title is now *Sepia (p) (p) (p)*. This goes on endlessly.

      A simple proposed fix is the following:

      In ezie/design/standard/javascript/ezie/design/standard/javascript/ezie.gui.tools_window.js
      Line ~45, check that the editor hasn't already been initialized before appending to the title once again, as such:

       
                  if (config.shortcut && !initialized) {
                      item.attr("title", item.attr("title") + " (" + config.shortcut + ")");
       
      . . .
      

      This issue was reproduced in, at least, ezie 1.2.0 and ezie 1.4.0.

      Steps to reproduce

      1. Edit an image with ezie, hover over any tool that also has a keyboard shortcut, for example, Sepia, and see that its title in the bottom bar is 'Sepia (p)'
      2. Close the editor, open it again, see that the title for the tool is now, for example, 'Sepia (p) (p)'

        Issue Links

          Activity

          Hide
          Filipe Dobreira added a comment - - edited

          Duplicate of http://issues.ez.no/19324

          The relevant portions from this report have been added as a comment to the issue above.

          Show
          Filipe Dobreira added a comment - - edited Duplicate of http://issues.ez.no/19324 The relevant portions from this report have been added as a comment to the issue above.

            People

            • Assignee:
              unknown
              Reporter:
              Filipe Dobreira
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: