diff --git a/src/text-editor-component.js b/src/text-editor-component.js index 3417fc929..881aaad81 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -1553,7 +1553,12 @@ class TextEditorComponent { } didPaste (event) { - // TODO Explain the motivation for this logic + // On Linux, Chromium translates a middle-button mouse click into a + // mousedown event *and* a paste event. Since Atom supports the middle mouse + // click as a way of closing a tab, we only want the mousedown event, not + // the paste event. And since we don't use the `paste` event for any + // behavior in Atom, we can no-op the event to eliminate this issue. + // See https://github.com/atom/atom/pull/15183#issue-248432413. if (this.getPlatform() === 'linux') event.preventDefault() }