GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.06k stars 407 forks source link

[Bug]: unsaved post content prompt bypassed #1246

Closed atomGit closed 8 months ago

atomGit commented 9 months ago

Operating system

manjaro

Publii version

0.42.1-1 (AUR)

Post editor

WYSIWYG editor

Bug description

if you create a new post and use a button combo (mouse aux for ex.) to go back to the main posts list, the warning prompt regarding unsaved changes is bypassed and the post content is lost

Steps to reproduce

as above

Relevant log output

No response

dziudek commented 8 months ago

Hi,

It seems that you somehow triggers a navigation which skips onbeforeunload event which is responsible for the data save popup.

I am unable to reproduce this case. Also I suppose that there is no way to protect before such behavior or it is just a bug in electron version for linux.