This is a static dump of issues in the old "Flyspray" bugtracker for DokuWiki. Bugs and feature requests
are now tracked at the issue tracker at Github.
Closed
Fixed
FS#2196 Access keys for Preview and Save produces pop-up in Safari/OSX.
CSS, XHTML, JS, Browsers
2011-03-06molefunk
When cursor is positioned inside the edit box, pressing the access keys for Preview (Ctrl+Alt+P) and Save (Ctrl+Alt+S) gives the following pop-up: "Unsaved changes will be lost." (see attached image).
I can't test this because I don't have a mac, but it seems like Safari is not executing the onclick event, when triggering the button actions via accesskeys.
Yes addEvent($('edbtn__save') and addEvent($('edbtn__preview') get executed (at least I see the alert I added to the two functions) when I use the shortcuts for preview or save under Safari
2011-04-17andi
I just pushed a change, that maybe helps to fix this problem. Could you try?
2011-04-17gb
No change.
2011-04-17andi
Hmm. Your test code with alert looked like this, right:
addEvent($('edbtn__preview'), 'click', function(){
alert('preview');
window.textChanged = false;
window.keepDraft = true; // needed to keep draft on page unload
});
When you have the alert() as above, does it get executed before the confirmation popup comes up or after?
2011-04-17gb
Before. I see first the alert and then the confirmation popup
2011-04-17andi
Hmm. Okay. I don't get it. The only explanation would be that when using accesskeys, the onbeforeunload event and the onclick handler are fired at the same time in two different threads. In that case the onbeforeunload wouldn't see the change made to the textChanged property in the onclick handler... I have absolutely no idea how to fix this and would consider it a bug in Safari.