sul-dlss / wallscreens

📺 curated experiences for touch-screen installations on the stanford campus
Other
1 stars 0 forks source link

disable right-clicking in the application #201

Closed camillevilla closed 2 years ago

camillevilla commented 2 years ago

Currently, it's really easy for a visitor to end up outside of the wallscreen app. If they press and hold their finger on part of the screen, they'll get a right-click and a menu. Screen Shot 2021-11-11 at 3 13 28 PM

I investigated some touchscreen-level options for disabling this in #162 but haven't had luck.

Close this ticket when:

cbeer commented 2 years ago

I wonder if there are browser flags we could use to disable this just on the touchscreens? Chrome kiosk mode looks like it disables right-click, at least:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --kiosk --app=https://sul-wallscreens.netlify.app

thatbudakguy commented 2 years ago

I did a bit of digging on this, and it appears that some browsers (maybe Chrome) actually actively stop you from doing this, so JS-based solutions will sometimes not work. One thing I did try, which worked in firefox (but not Chrome), was changing the template:

<body oncontextmenu="return false">

Kiosk mode worked for me and prevented right-clicking as well as refreshing. it may also prevent you from navigating away to other pages; not sure.

To enable kiosk mode on Windows, you can create a new shortcut to Chrome, right click it and select "properties", go to the "shortcut" tab and add "--kiosk" at the end of the "target" field.

camillevilla commented 2 years ago

Yes! This worked. I'll add some documentation to the operators manual and close this ticket soon.

camillevilla commented 2 years ago

https://docs.google.com/document/d/1nRJxErW5iLiZwGF3APBcTgETgBfQPnQ0ym5b9u_yxZE/edit#heading=h.6i42qtam