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

Arturo Bernal commented on JSPWIKI-375:
---------------------------------------

Checked in the current code (upstream master) and in Chrome on a running 
instance (Tomcat 10.1).

Prompt when leaving: with the plain editor it is there. After typing text, 
going to another page is stopped by the question of the browser about leaving 
the site, and with no changes there is no question, which is the design noted 
in the first comment. With the wysiwyg editor, which is what took the place of 
FCK, the prompt is missing: I typed text, which was in the frame of the editor, 
and the navigation went through with no question. In the wysiwyg editor 
window.onbeforeunload is null, while in the plain one it is a function. The 
handler is installed by the function onbeforeunload of Wiki.Edit.js and the 
scripts of the wysiwyg editor do not install one, so the comment of Harry about 
FCK still holds for the wysiwyg editor.

Lock: leaving the page does not release the page lock. The calls to 
PageManager.unlockPage are in Edit.jsp (the cancel action and the handling of 
an edit conflict), in Comment.jsp and in the ACL manager, and no script calls 
them when the page is left, so the lock stays until jspwiki.lockExpiryTime, 60 
minutes by default (see also JSPWIKI-107).

Limits: I did not measure the lock after leaving the page in the browser, only 
the code, and Chrome was the only browser. Leaving the issue open.

> "Are you sure" prompt when leaving the page editor via unusual ways
> -------------------------------------------------------------------
>
>                 Key: JSPWIKI-375
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-375
>             Project: JSPWiki
>          Issue Type: Improvement
>            Reporter: Florian Holeczek
>            Priority: Minor
>             Fix For: STRIPES/JCR-3.0
>
>
> When editing a page and leaving it via other ways than cancel or save (e.g. 
> via links in the LeftMenu or by typing a new address in the browser's address 
> bar), the user should be prompted whether he's sure about leaving (like 
> already implemented on the user preferences page).
> If he's sure about leaving, the cancel action should be called automatically, 
> for the page lock to disappear, too.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to