-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Low
-
None
-
Affects Version/s: 6.0, 7.0.0
-
Component/s: Keyboard Shortcuts
-
6
-
Severity 3 - Minor
NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.
Summary
Keyboard input on an HTML element with contenteditable="true" causes JIRA keyboard shortcuts to trigger. Affects JIRA version 7.3.1.
Steps to Reproduce
- Add an HTML element with contenteditable="true" to JIRA. This can be done by a web panel as a plugin via adding:
<web-panel name="MyPanel" key="mypanel" location="atl.jira.view.issue.right.context"> <resource name="view" type="static"><![CDATA[<p contenteditable="true">This is editable</p>]]></resource> </web-panel>
to atlassian-plugin.xml.
- Give this element keyboard focus and type c.}} {{
Expected Results
The character is inserted into the HTML element.
Actual Results
The "Create Issue" shortcut is triggered.
Notes
I've checked the shortcuts' module code and it seems that the event listener is only taking in consideration inputs. If the jQuery selector includes the [contenteditable], the issue will be resolved:
shortcuts.js
function keypress(event) {
if (jQuery(event.target).is(":input:not(button[type=button])")) {
// Note: Resetting the key stream isn't necessary here, since
// this will be done by keyup.
resetKeyStream();
// Ignore "aui:keypress" events inside form elements.
return;
}
...
}
- relates to
-
JRACLOUD-64154 Keyboard Input on contenteditable Element Triggers Shortcuts
-
- Closed
-