Skip to content

Commit 031cdd5

Browse files
committed
Make sure the Find sidebar is visible (scrollRectToVisible) when shown.
1 parent 7207ac2 commit 031cdd5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

visualvm/libs.profiler/lib.profiler.ui/src/org/graalvm/visualvm/lib/ui/components/HTMLTextAreaSearchUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,12 @@ public void setVisible(boolean visible) {
620620
boolean match = Boolean.parseBoolean((String)area.getClientProperty(PROP_LAST_FIND_MATCH_CASE));
621621
matchCase.setSelected(match);
622622

623+
SwingUtilities.invokeLater(new Runnable() {
624+
public void run() {
625+
((JComponent)SearchPanel.this.getParent()).scrollRectToVisible(getBounds());
626+
}
627+
});
628+
623629
requestFocusInWindow();
624630
} else {
625631
if (getSearchString().isEmpty()) area.putClientProperty(PROP_LAST_FIND_TEXT, null);

0 commit comments

Comments
 (0)