fix keyboard shortcut modal hotkeys firing during html editing

test plan:
* create a discussion topic
* click "Reply" to open a discussion reply editor
* click on "HTML Editor"
* make sure that entering "," and "<" and "?" all work
 and do not open the keyboard shortcut dialog

closes #CNVS-27510

Change-Id: If0800433dfe013dcdfa160a22fb6099a3ed46f9e
Reviewed-on: https://gerrit.instructure.com/73631
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
This commit is contained in:
James Williams 2016-03-03 09:07:18 -07:00
parent 7707758cf2
commit f3b6532803
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ define([
handleKeydown(e) {
// 188 is comma and 191 is forward slash
var keyComboPressed = e.which === 188 || (e.which === 191 && e.shiftKey);
if (keyComboPressed && e.target.nodeName !== "INPUT") {
if (keyComboPressed && e.target.nodeName !== "INPUT" && e.target.nodeName !== "TEXTAREA") {
e.preventDefault();
this.setState({isOpen: !this.state.isOpen});
}