Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why onBeforeUnload event breaks the page/fragment?

Sydney H.Jun 16 2014 — edited Jun 16 2014

Hi,

JDev 11.1.2.4

After the page or fragment loads I call a javascript method that sets a handler for the onBeforeUnload event.

window.addEventListener('beforeunload', function() { return 'lol'; });

So when I leave the page, I get a popup with a message. I can either Stay on the page or Leave it.

So far, so good.

If I click on Stay on this page. All the javascript behavior is messed up on the page. Popup does not show, click on buttons does not trigger actionListener.

Is there a reason?

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 14 2014
Added on Jun 16 2014
1 comment
246 views