diff options
author | pommicket <pommicket@gmail.com> | 2025-09-19 01:47:01 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-19 01:47:01 -0400 |
commit | a27ffcd70ca9dfad9f7cd7a99fbae484d1719c10 (patch) | |
tree | 97d56615c3fd10fe3cdfba940790fd715887d4b6 /pub | |
parent | dd033e6a001035d7a0da1c9037a328c112d87ea5 (diff) |
fix scrollIntoView for dialog fallback
Diffstat (limited to 'pub')
-rw-r--r-- | pub/blankplays.js | 6 | ||||
-rw-r--r-- | pub/index.html | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/pub/blankplays.js b/pub/blankplays.js index e58b9e3..41bdd4e 100644 --- a/pub/blankplays.js +++ b/pub/blankplays.js @@ -521,7 +521,11 @@ function showDialogById(id) { // support for browsers without <dialog> // (older iOS safari mainly) elem.style.display = 'block'; - elem.scrollIntoView(); + // not sure why this needs to be in a timeout. + // i guess we need to wait for re-flow or whatever. + setTimeout(() => { + elem.scrollIntoView(true); + }, 10); } } diff --git a/pub/index.html b/pub/index.html index 8f26796..335dc22 100644 --- a/pub/index.html +++ b/pub/index.html @@ -62,7 +62,7 @@ </div> - + <dialog id="how-to-play"> <h3>How to Play</h3> <p> @@ -117,7 +117,6 @@ <p> The NWL lexicon is by the North American Scrabble Players’ Association (NASPA), and the CSW lexicon is by HarperCollins. - </p> <p> Design/programming by pommicket. |