Skip to content
Snippets Groups Projects

Resolve #3202820 "508 issues lost"

2 files
+ 44
25
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 19
0
@@ -51,6 +51,25 @@
auto_open = modal.data("auto-open");
}
modal.on('shown.bs.modal', function() {
$(this).find(".js-modal-page-ok-buttom").first().focus();
});
modal.on('keydown', function(e) {
var keyCode = e.keyCode || e.which;
var lastElement = $(this).find('.js-modal-page-ok-buttom').last().is(':focus');
var firstElement = $(this).find(".js-modal-page-ok-buttom").first().is(':focus');
if (keyCode === 9 && !e.shiftKey && lastElement) {
e.preventDefault();
$(this).find(".js-modal-page-ok-buttom").first().focus();
} else if(keyCode === 9 && e.shiftKey && firstElement) {
e.preventDefault();
$(this).find(".js-modal-page-ok-buttom").last().focus();
}
});
// Open Modal on Auto Open.
if (auto_open == true) {
Loading