Lila: Shift + rightclick to mark tiles red in Firefox triggers context menu

Created on 9 May 2020  路  4Comments  路  Source: ornicar/lila

In firefox, when holding shift and right clicking / dragging on the board to highlight tiles / draw arrows, the context menu appears (the menu for right clicking with Save page as, etc.)
See here:
Screenshot from 2020-05-09 15-09-42

This can be fixed with the following, assuming e is the click event.

  e.preventDefault();
  e.stopPropagation();
  return false;

jsfiddle
That would be a nice quality of life update for Firefox users.

Most helpful comment

For each known browser there is a combination of Shift, Ctrl, Alt, Windows/Meta and AltGr that works and achieves every possible color without changing the settings. You just have to find which one works for you :laughing:

https://github.com/ornicar/chessground/issues/59

All 4 comments

Update: Apparently it's baked into firefox to always provide the user agent with a way to access the context menu (in a way that circumvents the oncontextmenu trigger). No way to disable this with javascript. Closing this issue.

@tvdhout, are you talking about the dom.event.contextmenu.enabled preference in about:config? I confirmed that setting it to true fixes this.

For each known browser there is a combination of Shift, Ctrl, Alt, Windows/Meta and AltGr that works and achieves every possible color without changing the settings. You just have to find which one works for you :laughing:

https://github.com/ornicar/chessground/issues/59

Thanks! Using Ctrl instead of shift gives me the desired result in firefox

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arex1337 picture arex1337  路  4Comments

isaacl picture isaacl  路  4Comments

ShRyDeR picture ShRyDeR  路  3Comments

niklasf picture niklasf  路  3Comments

AdmiralA picture AdmiralA  路  3Comments