fix jQuery sortable breaking select elements

This commit is contained in:
LenAnderson
2024-01-06 18:21:08 +00:00
parent f7b1b490c7
commit 5594aa456b
4 changed files with 15 additions and 0 deletions

View File

@ -39,6 +39,8 @@ export class QuickReplySetLink {
}
const set = document.createElement('select'); {
set.classList.add('qr--set');
// fix for jQuery sortable breaking childrens' touch events
set.addEventListener('touchstart', (evt)=>evt.stopPropagation());
set.addEventListener('change', ()=>{
this.set = QuickReplySet.get(set.value);
this.update();

View File

@ -158,6 +158,7 @@ export class SettingsUi {
// @ts-ignore
$(qrsDom).sortable({
delay: getSortableDelay(),
handle: '.drag-handle',
stop: ()=>this.onQrListSort(),
});
}