Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pass in useCapture flag

This flag became optional in recent versions of browsers
  • Loading branch information...
commit 63ceb435c5918446d0eb431816aec7ef4ce0dcf4 1 parent 0a72fd6
@matthieua authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/assets/javascripts/turbolinks.js.coffee
View
9 lib/assets/javascripts/turbolinks.js.coffee
@@ -172,11 +172,11 @@ browserCompatibleDocumentParser = ->
doc.close()
doc
- # Use createDocumentUsingParser if DOMParser is defined and natively
+ # Use createDocumentUsingParser if DOMParser is defined and natively
# supports 'text/html' parsing (Firefox 12+, IE 10)
#
# Use createDocumentUsingDOM if createDocumentUsingParser throws an exception
- # due to unsupported type 'text/html' (Firefox < 12, Opera)
+ # due to unsupported type 'text/html' (Firefox < 12, Opera)
#
# Use createDocumentUsingWrite if:
# - DOMParser isn't defined
@@ -196,8 +196,8 @@ browserCompatibleDocumentParser = ->
installClickHandlerLast = (event) ->
unless event.defaultPrevented
- document.removeEventListener 'click', handleClick
- document.addEventListener 'click', handleClick
+ document.removeEventListener 'click', handleClick, false
+ document.addEventListener 'click', handleClick, false
handleClick = (event) ->
unless event.defaultPrevented
@@ -242,6 +242,7 @@ initializeTurbolinks = ->
document.addEventListener 'click', installClickHandlerLast, true
window.addEventListener 'popstate', (event) ->
fetchHistory event.state if event.state?.turbolinks
+ , false
browserSupportsPushState =
window.history and window.history.pushState and window.history.replaceState and window.history.state != undefined
Please sign in to comment.
Something went wrong with that request. Please try again.