mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix double-clicking an item selecting its text
Cancel the selection on a double-click. This still allows selection by click-and-drag, which can be useful.
This commit is contained in:
@@ -354,6 +354,10 @@ function onSidebarClick(evt) {
|
||||
document.getElementById('pluginCardList').scrollToIndex(index);
|
||||
|
||||
if (evt.type === 'dblclick') {
|
||||
/* Double-clicking can select the item's text, clear the selection in
|
||||
case that has happened. */
|
||||
window.getSelection().removeAllRanges();
|
||||
|
||||
const card = document.getElementById(evt.target.getAttribute('data-id'));
|
||||
if (!card.classList.contains('flip')) {
|
||||
document.getElementById(evt.target.getAttribute('data-id')).onShowEditor();
|
||||
|
||||
Reference in New Issue
Block a user