From eb17afbad4600a046cdc2a3cc3292977b371c579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20=C3=98ygard?= Date: Wed, 28 Mar 2012 15:31:30 +0200 Subject: [PATCH] Modify thickbox to respect key modifiers --- root/static/lib/thickbox/thickbox.js | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/root/static/lib/thickbox/thickbox.js b/root/static/lib/thickbox/thickbox.js index 86bcf73..eb29200 100644 --- a/root/static/lib/thickbox/thickbox.js +++ b/root/static/lib/thickbox/thickbox.js @@ -18,7 +18,11 @@ $(document).ready(function(){ //add thickbox to href & area elements that have a class of .thickbox function tb_init(domChunk){ - $(domChunk).click(function(){ + $(domChunk).click(function(event){ + // Don't open thickbox if key modifiers are pressed + if(event.ctrlKey || event.shiftKey) { + return; + } var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; -- 1.7.7.5