couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2574) Clicking away from editor with unsaved changes should always show "do you want to save?" msg
Date Fri, 13 Feb 2015 21:52:15 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14320824#comment-14320824
] 

ASF GitHub Bot commented on COUCHDB-2574:
-----------------------------------------

Github user benkeen closed the pull request at:

    https://github.com/apache/couchdb-fauxton/pull/263


> 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)

Mime
View raw message