Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Fix mithril DOMException when reordering gamecards#2396

Open
RoepStoep wants to merge 2 commits intolichess-org:masterfrom
RoepStoep:slider-wrappers
Open

Fix mithril DOMException when reordering gamecards#2396
RoepStoep wants to merge 2 commits intolichess-org:masterfrom
RoepStoep:slider-wrappers

Conversation

@RoepStoep
Copy link

fixes dom exception when mithril tries to reorder the game cards after they are wrapped by Siema's slider frames

steps to reproduce (landscape orientation only, there may be other ways):

  • start two correspondence games where it is the opponent to move
  • click the ongoing games button top-right and find the game second in list
  • close the overlay again and make a move for the opponent in the second game
  • open ongoing games again, and a DOMException will appear

DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node

mithril tries to move the second game to the front after the session is refreshed, but can't because the game cards have been wrapped in slider divs by siema

this is fixed by creating the wrapper divs from mithril, and only let siema do the styling
there may be other (better?) ways, but this seemed least intrusive to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant