LongTurn support in Freeciv-web

Web version of freeciv at play.freeciv.org
sveinung
Elite
Posts: 430
Joined: Wed Feb 20, 2013 4:50 pm

Re: LongTurn support in Freeciv-web

Postby sveinung » Fri Jun 09, 2017 7:09 am

Corbeau wrote:The funny thing is, I can't see the pattern, when does the game interpret this as me wanting to leave the game and when it doesn't.


Maybe your browser interprets the middle click as "go to the URL in the clipboard"? If you are running X11 you can test this by selecting an URL ("copy") and middle clicking ("paste") on a web page.

User avatar
Corbeau
Elite
Posts: 907
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Postby Corbeau » Fri Jun 09, 2017 7:13 am

Hmmm, correct. Any idea how to get rid of it?

sveinung
Elite
Posts: 430
Joined: Wed Feb 20, 2013 4:50 pm

Re: LongTurn support in Freeciv-web

Postby sveinung » Fri Jun 09, 2017 7:35 am

Corbeau wrote:Hmmm, correct. Any idea how to get rid of it?

For you: Maybe have a look in your browser settings? For the game: I hope there is some way to override middle click past.

Update: from http://unixpapa.com/js/mouse.html
However, in some browsers the default actions of the right and middle mouse buttons cannot be disabled, or can only be disabled by changing browser settings. Such changes to browser settings typically effect all pages viewed through the browser, and typically cannot be done from Javascript. Since few users will want to do this, it pretty much means that the those mouse events are not usable from Javascript.
Last edited by sveinung on Fri Jun 09, 2017 8:02 am, edited 1 time in total.

User avatar
Corbeau
Elite
Posts: 907
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Postby Corbeau » Fri Jun 09, 2017 7:42 am

Ok, found it.

This behavior is easily disabled by going to about:config in the address bar, searching for middlemouse.contentLoadURL, and changing the value to false.

User avatar
Corbeau
Elite
Posts: 907
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Postby Corbeau » Sat Jun 10, 2017 8:37 pm

Ok, I just disbanded my horsemen because in the middle of typing a message in the chat, the pointer decided to switch to map. So can we have ANY kind of fix on this, please? Seriously? ANY kind?

Possible solutions:
- fix the chat and stop it from dying
- make a unit end its turn when you press space, but keep its moves in case I need it later (just like in Freeciv client)
- create a confirmation dialogue for such things: "Disband: yes no", and don't accept input from keyboard, only from mouse.

Sorry if I sound like I'm pissed off. That's because I'm pissed off.

User avatar
AndreasR
Elite
Posts: 688
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: LongTurn support in Freeciv-web

Postby AndreasR » Sat Jun 10, 2017 8:48 pm

Corbeau wrote:Ok, I just disbanded my horsemen because in the middle of typing a message in the chat, the pointer decided to switch to map. So can we have ANY kind of fix on this, please? Seriously? ANY kind?

Possible solutions:
- fix the chat and stop it from dying
- make a unit end its turn when you press space, but keep its moves in case I need it later (just like in Freeciv client)
- create a confirmation dialogue for such things: "Disband: yes no", and don't accept input from keyboard, only from mouse.

Sorry if I sound like I'm pissed off. That's because I'm pissed off.



Corbeau, can you please provide the exact steps required to reproduce this problem?
I have not been able to reproduce this problem myself yet.
I will try to include a fix this this bug when I release the new version tomorrow.


Andreas

User avatar
Corbeau
Elite
Posts: 907
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Postby Corbeau » Sat Jun 10, 2017 8:59 pm

I'm not sure. Simply, sometimes when I type a message, it just happens. I haven't been able to find any pattern, it doesn't happen very often and this is the first time that my unit got disbanded (or "recycled", I suspect the trigger was pressing "r" while a unit in a city was "active"). I'd say it happend in at least 1 in 10 messages I'm typing, ony no real damage happened.

Other times I just got some error messages in the chat, like "can't act on a tile" or something like that, was probably responding to "i" being pressed on a combat unit.

Someone else also said he disbanded his unit the same way.

User avatar
Caedo
Elite
Posts: 466
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: LongTurn support in Freeciv-web

Postby Caedo » Sat Jun 10, 2017 9:45 pm

Yeah, I'm not sure what triggers it, but apparently the game is sometimes listening to keyboard events even when the chat has focus, and pressing a key that gives a unit an order will take focus from the chatbox and execute that order. I've had it happen with "d" disbanding my Archers and with "x" acceidentally sending a unit on auto-explore, as well as many other times, when I didn't habe any units selected and it just forced me to click into the chat line again.

For reference, this is Firefox 53.0.3 on Windows 10.
~S.C. L.

User avatar
Corbeau
Elite
Posts: 907
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Postby Corbeau » Sun Jun 11, 2017 6:29 am

Right, for the record: Linux Mint (I think 17), Firefox 53.

louis94
Hardened
Posts: 211
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: LongTurn support in Freeciv-web

Postby louis94 » Sun Jun 11, 2017 8:38 am

Are you using laptops ? I've had similar issues with faulty palm detection.