Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Always set addEventListener and removeEventListener useCaption flag #192

Merged
merged 1 commit into from Mar 12, 2013
Jump to file or symbol
Failed to load files and symbols.
+5 −4
Split
@@ -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