BrowserHack
BrowserHack copied to clipboard
shift-click also moves
Shift-clicking on tile also moves my current character. I just looked into both mouse_event_handler (line 747) and the shift-click event listener (line 782, both win/web/nethack_lib.js) but judging from the early return statements, I couldnt find the root cause..
Again, this is on Firefox
I think I've fixed this in a commit, but not sure if you were reporting before or after it. https://github.com/coolwanglu/BrowserHack/blob/master/win/web/nethack_lib.js#L749 Basically while handling click events, if shiftKey is true, the event will be just ignored.
Can you try the latest version again?
You're right! It doesn't move anymore - but now I sometimes select text when shift-clicking.
Steps to reproduce:
- Single-click on some text (the big "BrowserHack" title or some text in the game log)
- shift-click an exciting tile
- observe how the text between your first click and the tile is selected
Of course this doesn't reproduce if you've clicked somewhere on the tiles before - but I'm a heavy keyboard user and seldomly click on the map.
Yes, I can reproduce it, not sure what to do thought. Maybe I need to intercept mousedown
and call preventDefault