1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

Fix esc shortcut after opening add url or search

This commit is contained in:
Yassine Guedidi 2025-03-09 00:14:55 +01:00
parent 8b0e6319e4
commit b266d6ca2f

View file

@ -100,5 +100,16 @@ export default class extends Controller {
e.preventDefault();
this.showActionsTarget.click();
});
const originalStopCallback = Mousetrap.prototype.stopCallback;
Mousetrap.prototype.stopCallback = (e, element, combo) => {
// allow esc key to be used in input fields of topbar
if (combo === 'esc' && element.dataset.topbarTarget !== undefined) {
return false;
}
return originalStopCallback(e, element);
};
}
}