Open intothephone opened 1 month ago
Interesting... I've found the root cause: variation
To be simple, if variations exist in the pgn, the switching between multiple games will not work. Take following pgn as an example:
[Event "test"] [Site "local"] [Date "2023.10.22"] [Round "1"] [White "human"] [Black "human"] [Result "*"] [ECO "C54"]
[Event "test"] [Site "local"] [Date "2023.07.04"] [Round "1"] [White "human"] [Black "human"] [Result "*"] [ECO "C59"]
I think it should be a bug.
And more interesting, it works fine switching to the game with variations the first time, but after that, you'll never show this game again.
Wow, that is really a strange behavior. So I have to find out the local storage that keeps some not valid data, when switching to a new PGN. I did not liked the code in the beginning, but it seemed to be doable. I will hopefully find the reason after your well done analysis. Thank you !
Many games mode works well in PC browser, and works well in mobile device browser, but not work in android webview. Following exceptions:
Uncaught TypeError: Cannot read properties of null (reading 'parentNode') at u (pgnViewer.js:1:1040639) at HTMLSelectElement. (pgnViewer.js:1:1039783)
The page is very simple(actually from examples):
This page can load properly in android webview, but when switching between games, above exceptions will come out and corresponding pgn could not be loaded. Any ideas?