Hello everybody,
I would like to temporarily disable some shortcut keys in Jira using the AUI library.
In my specific case, I would like to disable the "m" key (comment issue) in some workflow steps.
I tried this without success:
if (AJS.$("#status-val").text().trim() == "blablabla") { //alert("Blocking comments..."); AJS.$("#comment-issue").hide(); //OK AJS.$("#footer-comment-button").hide(); //OK AJS.whenIType("m").execute(function(){}); //NOK, the "m" key continues reacting to the comment operation }
Also, I installed and tried without success the JS Shortcut Library plugin (http://www.stepanreznikov.com/js-shortcuts/):
<script type="text/javascript" src="/jira/includes/js/plugins/js-shortcuts/jquery.shortcuts.min.js"></script> if (AJS.$("#status-val").text().trim() == "blablabla") { //alert("Blocking comments..."); AJS.$("#comment-issue").hide(); //OK AJS.$("#footer-comment-button").hide(); //OK AJS.$.Shortcuts.remove({type: 'hold',mask: 'm'}); //NOK, the "m" key continues reacting to the comment operation }
So, why the right way to acomplish this issue?
Community moderators have prevented the ability to post new answers.
Did you try with the last Jira? This seems to work fine now (Jira 6.0.6)!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.