From 7b654ff006e25e0d770d75d2df06ffe932ad5fe2 Mon Sep 17 00:00:00 2001 From: Anthony Nguyen Date: Wed, 30 Jan 2013 16:02:56 -0700 Subject: [PATCH] Jquery drag/drop disabling after changing column width --- src/classes/column.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/column.js b/src/classes/column.js index 9d3e1dd9..66cb2fa1 100644 --- a/src/classes/column.js +++ b/src/classes/column.js @@ -111,8 +111,8 @@ self.eventTaget.style.cursor = 'col-resize'; self.startMousePosition = event.clientX; self.origWidth = self.width; - $(document).mousemove(self.onMouseMove); - $(document).mouseup(self.gripOnMouseUp); + $(document).on('mousemove.kg-col-resize', self.onMouseMove); + $(document).on('mouseup.kg-col-resize', self.gripOnMouseUp); return false; }; self.onMouseMove = function (event) { @@ -125,8 +125,8 @@ }; self.gripOnMouseUp = function (event) { event.stopPropagation(); - $(document).off('mousemove'); - $(document).off('mouseup'); + $(document).off('mousemove.kg-col-resize'); + $(document).off('mouseup.kg-col-resize'); self.eventTaget.style.cursor = self.sortable() ? 'pointer' : 'default'; self.eventTaget = undefined; grid.config.columnsChanged(grid.columns.peek());