eevee / lexys-labyrinth

Chip's Challenge 2 emulator that runs in a browser
https://c.eev.ee/lexys-labyrinth/
Other
76 stars 13 forks source link

Pressing Space takes me to the bitbusters wiki page on Chip's Challenge Level Pack 3 #24

Closed ncrecc closed 3 years ago

ncrecc commented 3 years ago

Yep, this is a weird one. This always happens on LL except when the game frame is currently active (and not paused or on the "whoops" screen). Only lead is so far this is only happening on Vivaldi (3.5.2115.73), where Space simulates a mouse click on non-text field elements focused via Tab (though, on LL, pressing space takes me to the CCLP3 wiki page even when I already do have something focused). Could this be due to some unused "more info" button that links to CCLP3 by default, that Vivaldi automatically focuses on for some arcane reason? (Space to click currently focused element is, of course, the one thing it doesn't let me change. Slow clap for Vivaldi.)

eevee commented 3 years ago

Apparently this is because Vivaldi treats spacebar as a shortcut for "next page", though I don't know how it intuits what the next page is.

Is this still happening? I thought I fixed it with a well-placed preventDefault a couple days ago.

ncrecc commented 3 years ago

Still happening, yep.

eevee commented 3 years ago

Looks like Vivaldi's "fast forward" feature looks for links with particular names, and it's latching onto the "More" links at the ends of the CCLP descriptions. I am definitely calling preventDefault(), and I don't know why that isn't working, but an incredibly dumb workaround is to... change the text of those links. Tried that with commit 5653fc9, hopefully it helps!

ncrecc commented 3 years ago

That resolves it for now, thanks!