web mailing list archives

web@odoo-community.org

Avatar

Re: [OCA/web] 10.0-fix-issue-727 (#1010)

by Karan Shah <notifications@github.com> - 03/08/2018 14:01:16

@karan-dreambits commented on this pull request.


In web_confirm_window_close/static/src/js/web_confirm_window_close.js:

> @@ -10,6 +10,7 @@ odoo.define('web_confirm_window_close', function (require) {
             if ($('html').find('.oe_form_dirty').length) {
                 e.preventDefault();
             }
+            return 'Your have unsaved data. Are you sure you want to close window?';

@pedrobaeza @Tardo @OCA/web-maintainers I checked this PR with @devang-dreambits yesterday and what we found was that returning any string is enough to invoke the Confirm Dialog in chrome.
In outdated browsers, both chrome and firefox did show the returned string in the dialog but that it not an requirement.
So wouldn't it be better to return an empty string as it would work well with both new and old browsers and also not get into extra effort of making it translatable as it would be ignored by browsers anyways


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.