OrganonTweaks: swallow post-drag click so a held press (>100ms) never opens the card; v1.2

This commit is contained in:
2026-07-06 22:27:33 -03:00
parent a5721890a6
commit 310c34620f
6 changed files with 67 additions and 2 deletions

View File

@@ -34,6 +34,14 @@ class Plugin extends Base
'template' => 'plugins/OrganonTweaks/Asset/js/keep-scroll.js',
));
}
// Tweak: only open a card on a quick click (a press held > 100ms is a drag, so the
// trailing click is swallowed and the card does not open).
if ((int) $this->configModel->get('organon_tweaks_quick_click_only', 1) === 1) {
$this->hook->on('template:layout:js', array(
'template' => 'plugins/OrganonTweaks/Asset/js/click-guard.js',
));
}
}
public function getHelpers()
@@ -60,7 +68,7 @@ class Plugin extends Base
public function getPluginVersion()
{
return '1.1.0';
return '1.2.0';
}
public function getPluginHomepage()