[Rt-commit] rt branch 5.0/fix-search-result-shortcuts created. rt-5.0.3-251-ge6d3358955
BPS Git Server
git at git.bestpractical.com
Thu Feb 9 22:12:55 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/fix-search-result-shortcuts has been created
at e6d33589550fa9efcf4ac8556cfa3f94e7546b11 (commit)
- Log -----------------------------------------------------------------
commit e6d33589550fa9efcf4ac8556cfa3f94e7546b11
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Feb 10 06:01:52 2023 +0800
Target keyboard shortcuts modal accurately to make it work on search results
This is to avoid conflicts with other .modal elements like ones in
header filter. Without this, js would throw an error on typing "?":
Uncaught TypeError: Cannot read properties of undefined (reading 'close')
diff --git a/share/static/js/keyboard-shortcuts.js b/share/static/js/keyboard-shortcuts.js
index 8cfa2896e2..8ae117ed92 100644
--- a/share/static/js/keyboard-shortcuts.js
+++ b/share/static/js/keyboard-shortcuts.js
@@ -26,7 +26,7 @@ jQuery(function() {
};
var openHelp = function() {
- var modal = jQuery('.modal');
+ var modal = jQuery('.modal.keyboard-shortcuts');
if (modal.length) {
jQuery.modal.close();
return;
@@ -56,7 +56,7 @@ jQuery(function() {
};
var showModal = function(html) {
- var modal = jQuery("<div class='modal'></div>");
+ var modal = jQuery("<div class='modal keyboard-shortcuts'></div>");
modal.append(html).appendTo("body");
modal.bind('modal:close', function() { modal.remove(); })
modal.on('hide.bs.modal', function() { modal.remove(); })
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list