Merge pull request #1618 from cryptpad/Ctrl+E-modal-fixes

Remove focus from disabled elements on modals
This commit is contained in:
yflory 2024-09-06 11:30:22 +02:00 committed by GitHub
commit daa367672d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -2513,7 +2513,10 @@ define([
var next = function () {
selected = ++selected % types.length;
$container.find('.cp-icons-element-selected').removeClass('cp-icons-element-selected');
$container.find('#cp-newpad-icons-'+selected).addClass('cp-icons-element-selected');
let element = $container.find('#cp-newpad-icons-'+selected).addClass('cp-icons-element-selected');
if (element.hasClass('cp-app-disabled')) {
next();
}
};
$modal.off('keydown');