jQuery: Migrate to .on(), .off(), .trigger()

This avoids methods that are deprecated in newer versions of jQuery.
This commit is contained in:
webzwo0i 2021-07-05 17:12:47 +02:00 committed by Richard Hansen
parent c7195b1133
commit 4f99933d12
47 changed files with 196 additions and 196 deletions

View file

@ -437,8 +437,8 @@ const pad = {
// Prevent sticky chat or chat and users to be checked for mobiles
const checkChatAndUsersVisibility = (x) => {
if (x.matches) { // If media query matches
$('#options-chatandusers:checked').click();
$('#options-stickychat:checked').click();
$('#options-chatandusers:checked').trigger('click');
$('#options-stickychat:checked').trigger('click');
}
};
const mobileMatch = window.matchMedia('(max-width: 800px)');
@ -711,7 +711,7 @@ const pad = {
$('form#reconnectform input.diagnosticInfo').val(JSON.stringify(pad.diagnosticInfo));
$('form#reconnectform input.missedChanges')
.val(JSON.stringify(pad.collabClient.getMissedChanges()));
$('form#reconnectform').submit();
$('form#reconnectform').trigger('submit');
},
callWhenNotCommitting: (f) => {
pad.collabClient.callWhenNotCommitting(f);