mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Ensure top of card text visible when first viewed in Card Detail
This commit is contained in:
@@ -33,6 +33,7 @@ public class FHtmlViewer extends JEditorPane {
|
||||
SwingUtilities.invokeLater( new Runnable() { //need to invokeLater to avoid flicker
|
||||
public void run() {
|
||||
setSuperText(text.replaceAll("(\r\n)|(\n)", "<br>")); //replace line breaks with <br> elements
|
||||
setCaretPosition(0); //keep scrolled to top
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user