[
https://issues.apache.org/jira/browse/COUCHDB-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Keen reassigned COUCHDB-2574:
---------------------------------
Assignee: Ben Keen
> Clicking away from editor with unsaved changes should always show "do you
> want to save?" msg
> --------------------------------------------------------------------------------------------
>
> Key: COUCHDB-2574
> URL: https://issues.apache.org/jira/browse/COUCHDB-2574
> Project: CouchDB
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Fauxton
> Reporter: Ben Keen
> Assignee: Ben Keen
>
> Any time the user has made changes to the content in an Ace Editor then tries
> navigating away from the page, it should confirm they don't want the
> information lost. We do this in a few places right now, but not everywhere.
> The core FauxtonAPI.navigate function checks any beforeUnload functions all
> pass prior to redirecting. The issue is that in main.js, the chief event
> delegation function running on all <a>'s checks for the existence of a
> data-bypass attribute, but not that the attribute is set to true.
> Once we change this:
> bq. $(document).on("click", "a:not([data-bypass])", function(evt) {
> ... to this ...
> bq. $(document).on("click", "a:not([data-bypass=true])", function(evt) {
> ... the FauxtonAPI.navigate() function will be properly called for all links
> that aren't explicitly bypassing event delegation, and thus the beforeUnload
> function containing the alert() will get called as we want.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)