From ed67d8926ab05e751f2051cb9af61930d5234f96 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 28 Nov 2012 10:49:22 -0800 Subject: [PATCH] Prevent browser range selection --- server/camlistored/ui/recent.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/camlistored/ui/recent.js b/server/camlistored/ui/recent.js index 1b144af83..4c5643220 100644 --- a/server/camlistored/ui/recent.js +++ b/server/camlistored/ui/recent.js @@ -39,13 +39,17 @@ function divFromResult(searchRes, i) { } }; selSetter[i] = setSelected; + divperm.addEventListener("mousedown", function(e) { + if (e.shiftKey) { + e.preventDefault(); // prevent browser range selection + } + }); divperm.addEventListener("click", function(e) { if (e.ctrlKey) { setSelected(!divperm.isSelected); return; } if (e.shiftKey) { - e.stopPropagation(); // doesn't work? text is still selected :( if (lastSelIndex < 0) { return; }