IDEA-245671 rendered javadoc can't be selected with mouse click + drag on Windows

GitOrigin-RevId: 4cbd430dfd392285e1f287478cbc34835fc52295
This commit is contained in:
Dmitry Batrak
2020-07-10 14:28:39 +00:00
committed by intellij-monorepo-bot
parent e4179bc25d
commit 389ae1573b
@@ -116,8 +116,8 @@ class DocRenderMouseEventBridge implements EditorMouseListener, EditorMouseMotio
DocRenderer.EditorPane editorPane = ((DocRenderer)renderer).getRendererComponent(inlay, relativeBounds.width);
if (targetPane == null || targetPane == editorPane) {
int button = mouseEvent.getButton();
int modifiers = eventId == MouseEvent.MOUSE_DRAGGED && button == MouseEvent.BUTTON1 ? InputEvent.BUTTON1_DOWN_MASK : 0;
dispatchEvent(editorPane, new MouseEvent(editorPane, eventId, 0, modifiers, x, y, mouseEvent.getClickCount(), false,
dispatchEvent(editorPane, new MouseEvent(editorPane, eventId, 0, mouseEvent.getModifiersEx(), x, y,
mouseEvent.getClickCount(), false,
// hack to process middle-button clicks (JEditorPane ignores them)
button == MouseEvent.BUTTON2 ? MouseEvent.BUTTON1 : button));
return editorPane;