mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
IJPL-174856 Check the event source in the Markdown preview mouse click handler
(cherry picked from commit 79a23742a23e49469c689fc89dc7ee50ec9be6d1) IJ-CR-157286 GitOrigin-RevId: 987dffbe968db633b11bacca5ed0eccdbde57a80
This commit is contained in:
committed by
intellij-monorepo-bot
parent
55feb2fffa
commit
0fc7f6622a
@@ -29,6 +29,7 @@ import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.ui.awt.RelativePoint
|
||||
import com.intellij.util.concurrency.annotations.RequiresEdt
|
||||
import com.intellij.util.ui.StartupUiUtil
|
||||
import com.intellij.util.ui.UIUtil
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
@@ -93,6 +94,7 @@ class MarkdownPreviewFileEditor(
|
||||
|
||||
StartupUiUtil.addAwtListener(AWTEvent.MOUSE_EVENT_MASK, this) { event ->
|
||||
if (event is MouseEvent && event.id == MouseEvent.MOUSE_CLICKED && event.button == MouseEvent.BUTTON3
|
||||
&& UIUtil.isDescendingFrom(event.component, htmlPanelWrapper)
|
||||
&& event.component.isShowing() && htmlPanelWrapper.isShowing()
|
||||
&& component.containsScreenLocation(event.locationOnScreen)
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user