Page 2 of 2

Re: Confirmation notice before joining active game

PostPosted: 13 Aug 2019, 09:07
by Caladin
super_dipsy wrote:
Caladin wrote:I just went back, because I realized that my test wasn't conducted as I would normally act.

If you try to open the game in a new tab through the "join game" button, the confirmation prompt is bypassed. I just confirmed this.

Perhaps this would be better as a bug report than a suggestion?

I don't understand what you mean.

-If you click the "join Game" button you then get a list of games you can join (based on your filters)
-If you now click "Join" on any active game (where there is a surrendered country) you get the confirmation box

What is it you are doing? I note also you say 'in a new tab' - when you click Join Game it doesn't open a new tab (at least in FF on Windows). It uses the tab you were in before.


If you click on the button as if to open a new tab, such as through the middle mouse button, it bypasses the confirmation prompt.

Note; this is Chrome on Windows. I don't want to test in any more systems, lest I end up in even more games I don't want to be in.

Re: Confirmation notice before joining active game

PostPosted: 13 Aug 2019, 16:10
by super_dipsy
Caladin wrote: such as through the middle mouse button

I never even realized this was possible :oops: I've never in my life used the middle mouse button - I don't think I even knew what it did! So I have learned something.

I will do some research now. I suspect that because it is an odd button, Chrome must be automatically bypassing the Javascript that runs - I can;t actually see how it can, because it has to run the code to join you to the game, but presumably it is blocking the confirmation mechanism. Fascinating....!

Re: Confirmation notice before joining active game

PostPosted: 13 Aug 2019, 16:54
by super_dipsy
Ah. I see. Looking on Google, it appears the middle click bypasses normal click behaviour. Some posts recommend disabling the middle click on websites because of the problems it tends to throw up. I'm not sure whether that is a good idea or not for Playdip, but the alternative is pretty daunting. Basically, anywhere today we catch a button clic and do something on it, we would need to add code to look to see if we have had a middle button click and also take action. There must be loads of places, not just Join Game.

I will consult with nopunin10did who is taking over the code and see what he wants to do. It may be safest for everyone if we just do what others do and simpyl disable middle clicking on Playdip, but for anyone who does do this (like you) this might seem quite a hindrance. I assume you do it because you always want the click to open a new tab?

Anyway, I will talk with Nopun.

Re: Confirmation notice before joining active game

PostPosted: 13 Aug 2019, 22:49
by NoPunIn10Did
Caladin wrote:If you try to open the game in a new tab through the "join game" button, the confirmation prompt is bypassed. I just confirmed this.

Yeah, what we need to do here is prevent the middle-click from interacting with that button, as it's not a normal link. We should also make the UI element for that button differ from some of our other buttons that are just links.

Re: Confirmation notice before joining active game

PostPosted: 14 Aug 2019, 01:45
by Caladin
super_dipsy wrote:Ah. I see. Looking on Google, it appears the middle click bypasses normal click behaviour.


Hmmm, interesting. I didn't know that was how it worked; I would have thought it would just be the same as a right click and then "open new tab".

super_dipsy wrote:I will consult with nopunin10did who is taking over the code and see what he wants to do. It may be safest for everyone if we just do what others do and simpyl disable middle clicking on Playdip, but for anyone who does do this (like you) this might seem quite a hindrance. I assume you do it because you always want the click to open a new tab?


It would be a bit, particularly when opening active games - but better the inconvenience than the alternative.

Re: Confirmation notice before joining active game

PostPosted: 14 Aug 2019, 15:47
by super_dipsy
Caladin wrote:Hmmm, interesting. I didn't know that was how it worked; I would have thought it would just be the same as a right click and then "open new tab".

I agree 100%. Looking on Google, this is obviously something that lots of people hit and get frustrated about. To me, this is a bug plain and simple. Just to give you the picture (I don't know if you are techie or not, so forgive me if you know all this already!) the way buttons work is you freqyently set up a button to link to a particular program or URL to execute the desired operation. BUT, often you may want to validate input, send out confirmation boxes, issues warnings, etc.. You know, like Do you REALLY want to delete your whole hard drive?" or something ;) . There is a mechanism provided in the programming interface to do that BEFORE you go to the desired code / URL, by specifying 'onclick'. What the browser does is when it sees you click the button, it first runs the checking / warning code in the 'onclick' bit before then going to the actual action code/URL.

In my view, if a browser is going to interpret a middle click as executing the action, then it should also ensure it runs any 'onclick' checking code first. OK, it can choose to open the action code in a new window, but I feel it is a definite bug in the design for the middle click to be a 'click without validation' sort of click. The answer of saying people should disable middle clicking if there is onclick code to run is a cheap way of not solving the bug. It is a messy workaround.

But I am probably not the first programmer to say this, nor will I be the last I am sure! It wont ever get fixed, so we will have to disable the middle click if we have onclick code that needs to be run (ie any validation or warning or confirmation box stuff).