From 10482a82157c9ee4e9b84473254a4676ec913110 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 18 Feb 2011 19:32:37 -0500 Subject: Don't redirect if the user has interacted with the page by selecting something --- data/js/bug-page-mod.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/js/bug-page-mod.js b/data/js/bug-page-mod.js index a7d952b..afb1e1a 100644 --- a/data/js/bug-page-mod.js +++ b/data/js/bug-page-mod.js @@ -65,8 +65,9 @@ function tweakBugzilla(d) { var timer = d.defaultView.setTimeout(function() { // don't redirect if the user is using the page (for now, we just see // if they have scrolled the page, in which case we assume that they - // are using the page.) - if (d.defaultView.scrollY > 0) { + // are using the page, or if they've selected anything on the page.) + if (d.defaultView.scrollY > 0 || + d.defaultView.getSelection() == "") { cancelRedirection(); } else { d.location.href = url; -- cgit