mirror of
https://github.com/atom/atom.git
synced 2026-02-10 22:55:09 -05:00
Only handle the left mouse button (and middle on Linux)
This commit is contained in:
committed by
Antonio Scandurra
parent
35ae3fb08f
commit
17d579f949
@@ -760,9 +760,13 @@ class TextEditorComponent {
|
||||
|
||||
didMouseDownOnContent (event) {
|
||||
const {model} = this.props
|
||||
const {detail, ctrlKey, shiftKey, metaKey} = event
|
||||
const screenPosition = this.screenPositionForMouseEvent(event)
|
||||
const {button, detail, ctrlKey, shiftKey, metaKey} = event
|
||||
|
||||
// Only handle mousedown events for left mouse button (or the middle mouse
|
||||
// button on Linux where it pastes the selection clipboard).
|
||||
if (!(button === 0 || (this.getPlatform() === 'linux' && button === 1))) return
|
||||
|
||||
const screenPosition = this.screenPositionForMouseEvent(event)
|
||||
const addOrRemoveSelection = metaKey || (ctrlKey && this.getPlatform() !== 'darwin')
|
||||
|
||||
switch (detail) {
|
||||
|
||||
Reference in New Issue
Block a user