Skip to content
Browse files

Merge pull request #8 from thierry-rietsch/master

Added Mousetrap reset whenever keybindings get reloaded.
  • Loading branch information...
2 parents fe31fe3 + e422fc3 commit cd312a6cfd16e0ca540ded71a81aec1e45b933a6 @kugaevsky committed Sep 15, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/generators/mousetrap/install/templates/keybindings.js.coffee
View
3 lib/generators/mousetrap/install/templates/keybindings.js.coffee
@@ -5,6 +5,9 @@ $(document).on 'page:change', ->
handleKeyBindings()
handleKeyBindings = ->
+ # As turbolinks does not refresh the page, some old keybindings could be still present. Therefore a reset is required.
+ Mousetrap.reset()
+
# Hotkey binding to links with 'data-keybinding' attribute
# Navigate link when hotkey pressed
$('a[data-keybinding]').each (i, el) ->

0 comments on commit cd312a6

Please sign in to comment.
Something went wrong with that request. Please try again.