Installing Wanikani Open Framework

This makes more sense. The implication is this may not be a bug. Perhaps they suppress Backspace for reasons similar to those of @rfindley in Self Study Quiz. How to react to a keypress without an event to respond to?

Perhaps Viet can narrow down the scope of their keypresses suppression to avoid harming wkof. An email may still be a good idea IMHO.

The alternative is to do without Backspace and move the cursor before the offending characters and use Delete.

@prouleau @rfindley

OK, I found the place in WK’s native code where they block backspace on the reviews page. It blocks backspace (keycode 8) unless their input has focus, probably to prevent unintended navigation away from the page. However, using backspace to go back has been removed from Chrome/Safari for a while and is scheduled for removal from Firefox within the next 1-2 months. So they could probably just remove catching backspace entirely in a month or two.

Below is some workaround code. I also have pasted their code that causes the issue for reference.

Workaround Code:

$('#id_of_my_input').on('keydown', function(e) {
   if (e.keyCode === 8)
      e.stopPropagation();
});

Their code:

        var e, t;
        return t = $("#user-response"),
        e = $("#answer-form button"),
        $(document).on("keydown.reviewScreen", function(n) {
            var i;
            if (i = n.metaKey || n.altKey || n.shiftKey || n.ctrlKey,
            $("#reviews").is(":visible") && !($('[class^="note-"] textarea').is(":focus") || $(".user-synonyms input").is(":focus") || $("#front-chat-container textarea").is(":focus")))
                switch (n.keyCode) {
                case 8:
                    if (!t.is(":focus"))
                        return !1;
                    break;
            [...]
2 Likes