Open jiri-matejka opened 10 months ago
Excellent bug report, I will try to address that as soon as possible. I have a similar report of not being able to use the multigame viewer and switching programmatically, this seems to be related. See mliebelt/PgnViewerJS#477
Thanks a lot. That other bug report is also from me, and I don't think they are related. The other issue is just about supporting Z0
non-standard mark and it prevents the PgnViewer to be initialized. While thig bug occurs when the PgnViewer is correctly initialized.
Let me add one detail, in your Many games example, there are also some exceptions logged to console, when I switch from the first to second game, and the board is not reset.
https://mliebelt.github.io/PgnViewerJS/examples/1101.html
I get:
Uncaught TypeError: Cannot read properties of null (reading 'parentNode')
Thanks a lot. That other bug report is also from me, and I don't think they are related. The other issue is just about supporting
Z0
non-standard mark and it prevents the PgnViewer to be initialized. While thig bug occurs when the PgnViewer is correctly initialized.
Sorry, I got the reference wrong. I have now linked the correct issue, with a similar symptom.
I have a PGN with multiple games, using view modus.
Switching between games does not reset the game to the beginning and throws the exception.
Reproducing:
and
Codepen: https://codepen.io/jiri-matejka/pen/YzBxzbJ To view the errors in the codepen, check the browser console, not the codepen console.
PGN file: https://gist.github.com/jiri-matejka/0cd6ddf156c8dba307516d192e3d226a