From 88da09bc80ab514938cba5e5fdcfa5761167c432 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 16 Oct 2015 12:37:51 +0000 Subject: [PATCH] Do not scroll sidebox on selectboxes or video tutorials box --- phpgwapi/js/framework/fw_ui.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/phpgwapi/js/framework/fw_ui.js b/phpgwapi/js/framework/fw_ui.js index 300beb9256..d5f6f466fd 100644 --- a/phpgwapi/js/framework/fw_ui.js +++ b/phpgwapi/js/framework/fw_ui.js @@ -849,10 +849,18 @@ function egw_fw_ui_scrollarea(_contDiv) //Mousewheel handler var self = this; $j(this.scrollDiv).on('mousewheel',function(e, delta) { + var noscroll = false; + // Do not scrolldown/up when we are on selectbox items // seems Firefox does not prevent the mousewheel event over // selectbox items with scrollbars - if (delta && e.target.tagName != "OPTION" && e.target.tagName != "SELECT") + // Do not scroll on video tutorials as well + if (e.target.tagName == "OPTION" || e.target.tagName == "SELECT" || + e.target.getAttribute('class') && e.target.getAttribute('class').match(/egw_tutorial/ig)) + { + noscroll = true; + } + if (delta && !noscroll) { e.stopPropagation(); self.scrollDelta(- delta * 30);