kiwix / kiwix-js-pwa

Kiwix JS Offline Browser implemented as a Progressive Web App (PWA), and packaged as Electron, NWJS and UWP apps for Windows and Linux.
https://pwa.kiwix.org
GNU General Public License v3.0
186 stars 31 forks source link

Inconsistent button state when active #463

Open Jaifroid opened 1 year ago

Jaifroid commented 1 year ago

Only btnConfigure appears broken. Strange. Needs fixing before next release, though it appears to be broken in current PWA version.

Jaifroid commented 1 year ago

It's not broken, it just doesn't work well with touch. When using mouse, the unclick works fine, but when using touch, the icon remains depressed, even thought the unclick action works.

Jaifroid commented 1 year ago

Issue is mostly fixed by https://github.com/kiwix/kiwix-js-windows/commit/2abe499f7e6e13497bcb23b6417412957c9a2a68, though could still do with some finessing.

Jaifroid commented 1 year ago

Basically, what remains to be done is to use the same logic that works well for btnAbout for btnConfigure and btnRandom also. It may be that btnAbout works well because we remove it from the DOM and replace it with the printer button, etc. This is a "classic" sticky "hover" issue with touchscreens. All works fine with mouse, but the "hover" style is not properly removed with touch. We work around this with !important style rules, but the result is inconsistent currently.