mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make documentation window focusable
This commit is contained in:
+4
-1
@@ -260,6 +260,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
@Override
|
||||
protected void processMouseEvent(MouseEvent e) {
|
||||
if (e.getID() == MouseEvent.MOUSE_PRESSED && myHint != null) {
|
||||
//DocumentationComponent.this.requestFocus();
|
||||
initialClick = null;
|
||||
StyledDocument document = (StyledDocument)getDocument();
|
||||
int x = e.getX();
|
||||
@@ -328,7 +329,6 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
// Note: Making the caret visible is merely for convenience
|
||||
myEditorPane.getCaret().setVisible(true);
|
||||
}
|
||||
myEditorPane.getCaret().setSelectionVisible(true);
|
||||
myEditorPane.setBackground(EditorColorsUtil.getGlobalOrDefaultColor(COLOR_KEY));
|
||||
HTMLEditorKit editorKit = new UIUtil.JBHtmlEditorKit(true) {
|
||||
@Override
|
||||
@@ -913,6 +913,9 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
|
||||
PopupPositionManager.positionPopupInBestPosition(myHint, editor, dataContext);
|
||||
}
|
||||
myIsShown = true;
|
||||
// workaround for IDEA-188907
|
||||
myHint.getPopupWindow().setFocusableWindowState(true);
|
||||
myHint.getPopupWindow().setFocusable(true);
|
||||
if (myHint.getDimensionServiceKey() == null) {
|
||||
SwingUtilities.invokeLater(this::registerSizeTracker);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user