Ctrl+F doesn't work after answering a review


#22

He was joking… Just use the normal shortcuts.


#23

Oh…

Oh.

XD

Sorry, ignore me, Oldbonsaiーさん.


#24

Hrm. They’re working for me — I tested them out a ton before I pushed the change, but that doesn’t mean I didn’t miss something.

Do a few things for me: make sure to refresh the page to grab the latest JS; make sure userscripts are disabled; then check the web inspector console for JS errors on your end (I’m not getting any). If there are errors, drop the screenshot to hello@wanikani.com.


#25

It looks like the issue only starts happening after you use Ctrl+F. During a new review session or after doing a refresh, all of the WaniKani shortcuts work fine. After I use Ctrl+F once (even if I immediately hit ESC to close the search window), the WaniKani shortcuts stop working. To be safe, I tried clicking the page’s content to make sure it regained focus, but this made no difference. Going to the next item also does not fix the issue, and refreshing is required to get the shortcuts to work again.

There are no console errors and this occurs with or without user scripts running.

EDIT: The shortcuts also stop working when I use yomichan to popup the reading/definition of a word in the review (review word or example sentence). The only similarity with Ctrl+F that I can see is that something pops up over the WaniKani content.

For what it’s worth, I am using Chrome 60 on Windows 10.


#26

Alright, another patch should be live in a couple minutes, and you should get the normal keyboard shortcuts back after using find or anything else that uses the modifier keys (shift, alt, control, and command/windows).

Technical details: the problem was that the system (and the yomichan extension) was taking focus before the keyup event would register with the page, tripping up the detection I had in place for the modifier keys. I dug a bit more, and there are some better ways to determine if those keys are being held down that work more consistently/logically. For even more technical details, take a look at this MDN article. I wound up using the altKey/shiftKey/etc methods because of broader support.


#27

Awesome, thanks. I’m out of reviews for the night and do my daytime reviews on my phone. But I’ll check it out tomorrow evening and let you know how it looks.


#28

@oldbonsai Looks good now. Thanks for taking care of this!


#29

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.