jessepollak / command

:black_nib: Making the web better with Slack-like slash commands.
http://slashcommand.club
MIT License
1.11k stars 66 forks source link

Sometimes event listener is attached too late #19

Closed jessepollak closed 8 years ago

jessepollak commented 8 years ago

Sometimes the event listener for the field is attached too late, so Command isn't activated. To fix this, we should switch the listener from happening on focus to attempting on every keyup and short-circuiting if the field is already active.