LongTurn support in Freeciv-web

Web version of freeciv. Please mention the site you're using, if speaking things other than general freeciv-web codebase.
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: LongTurn support in Freeciv-web

Post by sveinung »

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: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Post by Corbeau »

Hmmm, correct. Any idea how to get rid of it?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: LongTurn support in Freeciv-web

Post by sveinung »

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: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Post by Corbeau »

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.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Post by Corbeau »

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.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
AndreasR
Elite
Posts: 754
Joined: Thu May 02, 2013 10:26 pm

Re: LongTurn support in Freeciv-web

Post by AndreasR »

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: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Post by Corbeau »

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.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: LongTurn support in Freeciv-web

Post by Alien Valkyrie »

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.
~ AVL
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: LongTurn support in Freeciv-web

Post by Corbeau »

Right, for the record: Linux Mint (I think 17), Firefox 53.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: LongTurn support in Freeciv-web

Post by louis94 »

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