Skip to content

Commit

Permalink
fix: #238 editor scrolls the browser page to top on Safari when getti…
Browse files Browse the repository at this point in the history
…ng focus
  • Loading branch information
josdejong committed May 3, 2023
1 parent df0edb3 commit 20129f8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/lib/components/modes/treemode/TreeMode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
line-height: var(--jse-line-height);

.jse-hidden-input-label {
position: fixed;
right: 0;
top: 0;
width: 0;
height: 0;

.jse-hidden-input {
width: 0;
height: 0;
position: fixed;
top: -10px;
left: -10px;
// important: width and height must be larger than zero, else Safari gives problems: scrolls to top when the editor gets focus, see /~https://github.com/josdejong/svelte-jsoneditor/issues/238
width: 1px;
height: 1px;
padding: 0;
border: 0;
outline: none;
Expand Down

0 comments on commit 20129f8

Please sign in to comment.