Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » ExitConfirmation doesn't work on firefox and chrome
ExitConfirmation doesn't work on firefox and chrome [message #1774502] Mon, 16 October 2017 14:38 Go to next message
Nicola  Zanaga is currently offline Nicola ZanagaFriend
Messages: 49
Registered: July 2009
Member
Hello, using rap 3.3 or 3.2, the ExitConfirmation service message doesn't work with Firefox 56 or Chrome 61.
Closing session, the exit message compares only few times

It works with Internet explorer.


Simple snippet:
public class Test1 implements EntryPoint {

    @Override
    public int createUI() {
        RWT.getClient().getService(ExitConfirmation.class).setMessage("hello");

        Shell s = new Shell();
        s.setText("Hello");
        s.setBounds(0, 0, 300, 300);
        s.open();
        return 0;
    }

}
Re: ExitConfirmation doesn't work on firefox and chrome [message #1774649 is a reply to message #1774502] Wed, 18 October 2017 10:27 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2263
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
it seems there are some ongoing changes in Firefox and Chrome related to "beforeunload" event. Just tested on recent (Chrome 61 and Firefox 56) browsers and "beforeunload" event is not fired at all. Custom message is no longer supported in most browsers and we will remove the ExitConfirmation client service soon.
Regards,
Ivan
Re: ExitConfirmation doesn't work on firefox and chrome [message #1774651 is a reply to message #1774502] Wed, 18 October 2017 10:36 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2263
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
... in order to show the dialog a user gesture is required before (at least in Chrome 60+). See [1]. In my tests the same is valid for Firefox.

[1] https://developers.google.com/web/updates/2017/06/chrome-60-deprecations
Re: ExitConfirmation doesn't work on firefox and chrome [message #1774711 is a reply to message #1774651] Thu, 19 October 2017 00:43 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 193
Registered: February 2011
Senior Member
It still works for me on Chrome 61, providing the page has been interacted with. It's still a useful feature. I use it to warn a user has unsaved changed before navigating away. They only have unsaved changed if they have interacted with the page.

The custom message doesn't display in Chrome any more but please don't remove the service.
IE11 still display the supplied message.
Re: ExitConfirmation doesn't work on firefox and chrome [message #1774762 is a reply to message #1774502] Thu, 19 October 2017 11:58 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2263
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Chris,
once IE stop displaying a custom message ExitConfirmation#set/getMessage will not make sense anymore. We will keep the service, but will probably change the API to something like ExitConfirmation#set/getEnabled() or ExitConfirmation#enable().
Regards,
Ivan
Previous Topic:Cannot use RAP Oxygen SR1 with Equinox SR1a
Next Topic:How get number of sessions?
Goto Forum:
  


Current Time: Tue Feb 20 06:12:49 GMT 2018

Powered by FUDForum. Page generated in 0.01633 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software