- edited description
JS event handler should not be attached to document objects multiple time.
Issue #104
resolved
With rails turbolink and js event attachment, in common.js.coffee
:
$(document).on "page:change", ->
$('.modal').on 'shown.bs.modal', (e) ->
$(e.target).find('[autofocus]').focus()
These codes will attached to a certain object multiple times after browsing pages back and forth.
Comments (2)
-
reporter -
- changed status to resolved
Merged in jimmychu0807/cnpaas-portal (pull request #128)
fix: js listeners no longer bind to DOM objects multiple times. (fix
#104)→ <<cset e27274cf1c82>>
- Log in to comment