Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-21780

Updated: Cannot produce special characters using AltGr due to RTE keyboard shortcuts

      After upgrading to Confluence 3.4, the Rich Text Editor breaks standard keyboard functionality.

      How: By capturing AltGr + [1 - 7, Q] (which produce different special characters on European keyboard layouts) as Ctrl + Alt + [1 - 7, Q] (which formats text as heading, quote or paragraph).

      Below are examples of only a few signs that cannot be produced due to this bug. They may apply to more than one layout and many more can be found for instance on Wikipedia.

      Examples:
      AltGr + 2 produces at sign (@) (FI)
      AltGr + 3 produces pound sign (£) (FI)
      AltGr + 4 produces dollar sign ($) (FI)
      AltGr + 7 produces left curly brace ({) (FI)
      AltGr + Q produces at sign (@) (IS, DE)

      This behavior is changed from Confluence 3.3 where Ctrl + Alt + number combinations were not mapped to heading formatting shortcuts; only Ctrl + number combinations were.

      To reproduce one of these issues:

      • Change the keyboard layout to Finnish
      • Open the Rich Text Editor
      • Type some text
      • Press AltGr+2, which should produce an at sign (@)

      Instead the text changes to a level 2 heading.

      This behavior is breaking our editing experience as the only way to produce these special characters is to switch to markup mode. This breaks the editing workflow. The bug is also not readily apparent and may confuse a large portion of users.

      Workaround

      NOTE: A workaround has been provided in the comments by Atlassian (link), although it has to be reapplied after every Confluence upgrade.

            [CONFSERVER-21780] Updated: Cannot produce special characters using AltGr due to RTE keyboard shortcuts

            These shortcuts have been changed to Ctrl+1-8. This should stop the issues with the AltGr button. Safari users may find these shortcuts are overridden by the browser

            Matthew Erickson added a comment - These shortcuts have been changed to Ctrl+1-8. This should stop the issues with the AltGr button. Safari users may find these shortcuts are overridden by the browser

            HuseinA added a comment -

            bumping it to major since this affects European (German) users badly.

            HuseinA added a comment - bumping it to major since this affects European (German) users badly.

            Added emphasis to the note on the workaround.

            Deleted Account (Inactive) added a comment - Added emphasis to the note on the workaround.

            Issue title and description updated to be more general in order to cover more cases.

            Deleted Account (Inactive) added a comment - Issue title and description updated to be more general in order to cover more cases.

            Added affected versions.

            Deleted Account (Inactive) added a comment - Added affected versions.

            The javascript debugger runs batch.js:436, removeFormat, everytime Alt Gr + 7 is pressed.

            Markus Torstensson added a comment - The javascript debugger runs batch.js:436, removeFormat, everytime Alt Gr + 7 is pressed.

            Worth noting: You may have to clear your browser cache before the change is reflected in the editor. At least using Chrome 9, force refreshing did not yet reflect the change.

            Deleted Account (Inactive) added a comment - Worth noting: You may have to clear your browser cache before the change is reflected in the editor. At least using Chrome 9, force refreshing did not yet reflect the change.

            Here's a workaround:

            1. Unzip the <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip.
            2. Unjar the confluence-tinymce-plugin-X.X.X.X.jar in the unzipped atlassian-bundled-plugins.zip.
            3. Once unjarred, edit the /tinymce3/tiny_mce_src.js.
            4. Change the following line in the file:
               
              				t.addShortcut('ctrl+alt+7,ctrl+7', '', ['FormatBlock', false, 'p']); // ATLASSIAN - added ctrl+alt+7 as a shortcut. 
              

              to:

               
              				t.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']); 
              
            5. Save the file.
            6. Jar the file back to confluence-tinymce-plugin-X.X.X.X.jar.
            7. Zip the atlassian-bundled-plugins.zip back.
            8. Restart your Confluence instance. Your changes would be reflected after this. You may need to force refresh your browser.

            If you need a guide to help with the editing files within JAR archives, you can refer to this Editing Files within JAR Archives. However, please keep in mind that the Tinymce plugin is part of bundled plugins. Hence, it is stored in a special place, which is located at <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip. Therefore, if you are following the guide, please make sure the paths are correct.

            Sashidaran Jayaraman [Atlassian] added a comment - - edited Here's a workaround: Unzip the <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip . Unjar the confluence-tinymce-plugin-X.X.X.X.jar in the unzipped atlassian-bundled-plugins.zip . Once unjarred, edit the /tinymce3/tiny_mce_src.js . Change the following line in the file: t.addShortcut( 'ctrl+alt+7,ctrl+7' , '', [' FormatBlock ', false , ' p']); // ATLASSIAN - added ctrl+alt+7 as a shortcut. to: t.addShortcut( 'ctrl+7' , '', [' FormatBlock ', false , ' p']); Save the file. Jar the file back to confluence-tinymce-plugin-X.X.X.X.jar . Zip the atlassian-bundled-plugins.zip back. Restart your Confluence instance. Your changes would be reflected after this. You may need to force refresh your browser. If you need a guide to help with the editing files within JAR archives, you can refer to this Editing Files within JAR Archives . However, please keep in mind that the Tinymce plugin is part of bundled plugins. Hence, it is stored in a special place, which is located at <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip . Therefore, if you are following the guide, please make sure the paths are correct.

              merickson Matthew Erickson
              66e3f085-201c-42f5-8f25-cea80bb6554f Deleted Account (Inactive)
              Affected customers:
              4 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: