Created
March 2, 2014 02:54
-
-
Save jacquescrocker/9301184 to your computer and use it in GitHub Desktop.
hash_no_back_hack.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# override ember's hashlocation to not do back/forward functionality | |
Ember.HashLocation.reopen({ | |
setURL: (path) -> | |
@replaceURL(path) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
well... when you have ember in an iframe (embedded in gmail via chrome extension), you don't want ember to take over the back/forward buttons of the parent window
this hack solves it, in a terrible yes-it-will-break-in-the-future way (it overrides a private api method)
seems like ember needs a router configuration option to enable/disable back/forward. i'll post a feature request but i can't see them thinking my use case is terribly important for them