mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
@@ -1318,6 +1318,12 @@ describe "EditorComponent", ->
|
||||
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([4, 8]), {target}))
|
||||
expect(editor.isFoldedAtBufferRow 4).toBe false
|
||||
|
||||
describe "when the horizontal scrollbar is interacted with", ->
|
||||
it "clicking on the scrollbar does not move the cursor", ->
|
||||
target = horizontalScrollbarNode
|
||||
linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([4, 8]), {target}))
|
||||
expect(editor.getCursorScreenPosition()).toEqual [0, 0]
|
||||
|
||||
describe "mouse interactions on the gutter", ->
|
||||
gutterNode = null
|
||||
|
||||
|
||||
@@ -613,6 +613,7 @@ EditorComponent = React.createClass
|
||||
|
||||
onMouseDown: (event) ->
|
||||
return unless event.button is 0 # only handle the left mouse button
|
||||
return if event.target?.classList.contains('horizontal-scrollbar')
|
||||
|
||||
{editor} = @props
|
||||
{detail, shiftKey, metaKey, ctrlKey} = event
|
||||
|
||||
Reference in New Issue
Block a user