allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] 07/07: [#8282] make keypress check work in Edge too
Date Tue, 04 Jun 2019 15:14:43 GMT
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 067d20baa200687eb7c04f0e06340b6e8b5938c1
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
AuthorDate: Tue Jun 4 15:11:29 2019 +0000

    [#8282] make keypress check work in Edge too
---
 Allura/allura/lib/widgets/resources/js/sf_markitup.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index 65d37a2..ae47044 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -82,10 +82,11 @@ $(window).load(function() {
 
             // user mentions support
             editor.codemirror.on("keyup", function (cm, event) {
-              if(event.key == "@")
+              if(event.key === "@" || (event.shiftKey && event.keyCode === 50 /*
"2" key */)) {
                 CodeMirror.showHint(cm, CodeMirror.hint.alluraUserMentions, {
                   completeSingle: false
                 });
+              }
             });
 
             editor.render();


Mime
View raw message