Skip to content

Keyboard.removeEvents() doesn't work#1083

Open
jfly wants to merge 1 commit intomootools:masterfrom
jfly:Keyboard-removeEvent-fix
Open

Keyboard.removeEvents() doesn't work#1083
jfly wants to merge 1 commit intomootools:masterfrom
jfly:Keyboard-removeEvent-fix

Conversation

@jfly
Copy link
Copy Markdown

@jfly jfly commented Dec 16, 2011

Keyboard.addEvent calls parent() with a parsed event type. When removeEvents is called, it will call removeEvent with the already parsed event type. We cannot call Keyboard.parse() inside of removeEvent because then we would be parsing an already parsed event type.

I don't really like my fix, as it means that an argument to Keyboard.addEvent() is not a valid argument to Keyboard.removeEvent. I'm not sure what the best fix to this problem is, however.

…eEvents is called, it will call removeEvent with the already parsed event type. We cannot call Keyboard.parse() inside of removeEvent because then we would be parsing an already parsed event type.

I don't really like my fix, as it means that an argument to Keyboard.addEvent() is not a valid argument to Keyboard.removeEvent. I'm not sure what the best fix to this problem is, however.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant