summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-12-30 17:11:50 +0000
committerGitHub <noreply@github.com>2019-12-30 17:11:50 +0000
commitc2d854cfd29263953475315212ee71fd02d5f354 (patch)
tree6c74a25e4561bb08e80398f5b3530831c55fb421 /web_src
parentd59536c222857713d95846d77903282afe608f23 (diff)
downloadgitea-c2d854cfd29263953475315212ee71fd02d5f354.tar.gz
gitea-c2d854cfd29263953475315212ee71fd02d5f354.zip
In SimpleMDE check if trigger exists before call (#9545)
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index 395a01f059..f4f08b828c 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -1490,7 +1490,9 @@ function setCommentSimpleMDE($editArea) {
}
},
Backspace: (cm) => {
- cm.getInputField().trigger('input');
+ if (cm.getInputField().trigger) {
+ cm.getInputField().trigger('input');
+ }
cm.execCommand('delCharBefore');
}
});