From 83741db5aaa556d7402b677230eb408f7920a2d7 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Sun, 21 Jan 2018 01:18:59 +0100
Subject: [PATCH] Fix broken smooth & horizontal scrolling with cursor above
 columns

Closes #192
---
 Resources/Scripts/code.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js
index 1ec31fd6..f8738fe0 100644
--- a/Resources/Scripts/code.js
+++ b/Resources/Scripts/code.js
@@ -1278,6 +1278,15 @@
     };
   }
   
+  //
+  // Block: Remove column mouse wheel handler, which allows smooth scrolling inside columns, and horizontally scrolling column container when holding Shift.
+  //
+  if (ensurePropertyExists(TD, "ui", "columns", "setupColumn")){
+    TD.ui.columns.setupColumn = appendToFunction(TD.ui.columns.setupColumn, function(e){
+      $(".js-column[data-column='"+e.model.getKey()+"']").off("mousewheel onmousewheel");
+    });
+  }
+  
   //
   // Block: Detect and notify about connection issues.
   //