We have a 2013 on-prem setup. We are site collection admin so everything is client-side and javascript, no access to central admin. We have a site using page publishing features and custom page layouts.

On our custom page layouts we have some webpart zones with content editor webparts already on a blank page. When we go to edit the page we get a Click here to add new content to the default empty content editor webparts.

When we click that to add new content we get a confirm/alert window

Leave site?

Changes you made may not be saved.

Leave Cancel

If we click leave we go to the site's landing page and if we click cancel we stay on the page and can enter our content into the content editor webpart.

This is confusing for our site users.

I know it must be something we've done in some custom code, other sites we have don't have this issue, but I can't figure out where to look.

I've used the debugger in my browser and can't really figure out where to add breakpoints or which bit of code to follow. Seems that it is called onbeforeunload, but that is about all I've been able to track down.

Anybody know what is going on when you Click here to add new content?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.