Skip to content

If you put an alert in a callback this.pressing is always wrong  #9

@andyhmltn

Description

@andyhmltn

If you use Quay in the following fashion:

myQuayInstance.capture({
    'up': function() {
        alert('Up up up');
    }
})

an alert pops up. However, unless you hold on to up until the alert is dismissed, the keyup event is never registered and up is forever in this.pressing

I'm unsure if this is an issue or not as it only affects people using alert in callbacks. This is a result of me removing this.pressing = [] after a callback is run.

  1. Allow for holding key(s) and pressing another key. For example: Pressing cmd+alt and mashing a would run the cmd_alt_a callback on every press of a

OR

  1. Use alerts in your callbacks.

Pick one. It seems to me that there is probably a better way of allowing for 1 that doesn't destroy 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions