Page 1 of 1

Scoring dialog sometimes not closing thanks to button

Posted: 18 June 2018, 22:04
by Woodruff
Hi,
Like my previous message, I posted this problem on the bug management system because I suspect a failure from a website.
I'm using a scoring table to display at the end of a card game, through a 'notifTable' notification. I'm using the standard option 'closing' to insert a button for closing this pop-up. In game, sometimes that button works, sometimes it does not. I don't see how I could do a mistake through a single line of code but... who knows, I may be missing something :)

Here's my code:

Code: Select all

$this->notifyAllPlayers("tableWindow", '', array(
            "id" => 'handScoring',
            "title" => clienttranslate("Results"),
            "table" => $table,
            "closing" => clienttranslate("Close")
));
Do you have any feedback on this problem?

Thanks!

Tcheby

Re: Scoring dialog sometimes not closing thanks to button

Posted: 18 June 2018, 23:09
by Victoria_La_Dev0
Is a bug indeed in the dialog management. Closing button does not work at all. You better remove it completely and only rely on X icon.
I did few hacks overloading dialog class to fix it but it just not worth it. Basically when you close using this button, the dialog does not get removed it stays but invisible, so new is open its created another instance, now we have 2 close buttons with same id which does not really work in second dialog, bunch of mess is created as a result.

Re: Scoring dialog sometimes not closing thanks to button

Posted: 20 June 2018, 15:52
by Woodruff
OK thanks Victoria_La.
The link to this bug is: https://fr.boardgamearena.com/#!bug?id=10315