From 2a1719f337616d192ffa1b2ad06119b0256e6bc4 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 25 Jul 2018 08:21:55 -0400 Subject: [PATCH] Pass bufferRow and screenRow as numbers --- src/text-editor-component.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/text-editor-component.js b/src/text-editor-component.js index 5f7cbdcbc..6dc968efc 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -3364,15 +3364,23 @@ class LineNumberGutterComponent { if (this.props.onMouseDown == null) { this.props.rootComponent.didMouseDownOnLineNumberGutter(event) } else { - const {bufferRow, screenRow} = event.target.dataset - this.props.onMouseDown({bufferRow, screenRow}) + const {bufferRowStr, screenRowStr} = event.target.dataset + this.props.onMouseDown({ + bufferRow: parseInt(bufferRowStr, 10), + screenRow: parseInt(screenRowStr, 10), + domEvent: event + }) } } didMouseMove (event) { if (this.props.onMouseMove != null) { - const {bufferRow, screenRow} = event.target.dataset - this.props.onMouseMove({bufferRow, screenRow}) + const {bufferRowStr, screenRowStr} = event.target.dataset + this.props.onMouseDown({ + bufferRow: parseInt(bufferRowStr, 10), + screenRow: parseInt(screenRowStr, 10), + domEvent: event + }) } } }