? ? Success

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
17 Oct 2014

Lets be more Informative

When editing an article, menu, category (anything singular), and press the back button the refresh or the close button on the browser, user most probably will loose any data without warning. This PR throws a standard browser window with custom message to inform him/her. Of course we are not forcing anything he/she can go ahead and close the window, but we did informed them

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar dgt41 dgt41 - open - 17 Oct 2014
avatar jissues-bot jissues-bot - change - 17 Oct 2014
The description was changed
Labels Added: ?
avatar dgt41 dgt41 - change - 17 Oct 2014
The description was changed
avatar 1apweb 1apweb - test_item - 17 Oct 2014 - Tested successfully
avatar 1apweb
1apweb - comment - 17 Oct 2014

Very well!

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar zero-24
zero-24 - comment - 17 Oct 2014

@test looks cool on FF here (using the close button). But dont work on closing the browser window.

On Chrome it don't work with the close button but on closing the browser window.

I think this is a browser specific issue how they handle such things?

avatar dgt41
dgt41 - comment - 17 Oct 2014

@zero-24 close button -> I meant to write current tab close button...

avatar zero-24
zero-24 - comment - 17 Oct 2014

thanks @dgt41 looks like a cache issue :D ok now at my end.
But please double check the save and save as copy button at your end. Here i also get the warning message in FF

avatar brianteeman
brianteeman - comment - 17 Oct 2014

Please no. Personally speaking I would hate it

On 17 October 2014 14:14, zero-24 notifications@github.com wrote:

thanks @dgt41 https://github.com/dgt41 looks like a cache issue :D ok
now at my end.
But please double check the save and save as copy button at your end.
Here i also get the warning message in FF


Reply to this email directly or view it on GitHub
#4773 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar dgt41
dgt41 - comment - 17 Oct 2014

@brianteeman Why? For people using correctly the software, this will never popup.

avatar dgt41
dgt41 - comment - 17 Oct 2014

@zero-24 I get that as well, I am on it!

avatar dgt41 dgt41 - change - 17 Oct 2014
The description was changed
avatar ghilo25 ghilo25 - test_item - 17 Oct 2014 - Tested successfully
avatar ghilo25
ghilo25 - comment - 17 Oct 2014

great feature :)

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar jissues-bot jissues-bot - change - 17 Oct 2014
Title
ISIS UX Warning message when about to leave edit
ISIS UX Warning message when about to leave edit
avatar brianteeman brianteeman - change - 17 Oct 2014
Category Templates (admin) UI/UX
avatar ghilo25
ghilo25 - comment - 17 Oct 2014

the feature works well when cliking on the close button and the previous browser button but it doesn't works when closing the browser tab !

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar hvdmeer hvdmeer - test_item - 17 Oct 2014 - Tested successfully
avatar hvdmeer
hvdmeer - comment - 17 Oct 2014

Confirming on editing article, menu and category, also when closing browser tag (Chrome 38.0) I get a message.

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar AlexVeSo AlexVeSo - test_item - 17 Oct 2014 - Tested successfully
avatar sandstorm871 sandstorm871 - test_item - 17 Oct 2014 - Tested successfully
avatar brianteeman
brianteeman - comment - 17 Oct 2014

@dgt41 please can you look at the browser tab issue from @ghilo25 before we can commit this

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar dgt41
dgt41 - comment - 17 Oct 2014

@brianteeman Pretty please DONT commit yet. Firefox behaves erratically on save as, save and close and save + new! I need some time to figure out why.

avatar brianteeman
brianteeman - comment - 17 Oct 2014

Thats why I didnt mark it RTC.
I will however remove the test results so that your new code (when it comes) is retested

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar brianteeman brianteeman - alter_testresult - 17 Oct 2014 - 1apweb: Not tested
avatar brianteeman brianteeman - alter_testresult - 17 Oct 2014 - AlexVeso: Not tested
avatar brianteeman brianteeman - alter_testresult - 17 Oct 2014 - ghilo25: Not tested
avatar brianteeman brianteeman - alter_testresult - 17 Oct 2014 - sandstorm871: Not tested
avatar brianteeman brianteeman - alter_testresult - 17 Oct 2014 - hvdmeer: Not tested
avatar brianteeman
brianteeman - comment - 18 Oct 2014

Best to close this one for now I think
On 18 Oct 2014 18:13, "Dimitri Grammatiko" notifications@github.com wrote:

Update:
The Firefox erratic behavior on redirects and onBeforeUnload is well
known bug, which Mozilla won’t fix. Ref:
https://support.mozilla.org/en-US/questions/987018
http://forums.mozillazine.org/viewtopic.php?f=9&t=2806589

The other way to get around this is to use EventListener, but then IE8
doesn’t support that.
In this page:
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener
there is a compatibility code for IE8.
But this option (using EventListeners) is way off my league!

Bottom line
If there is a javascript guru that can fix this, please take over
otherwise let’s close this [image: :-1:]


Reply to this email directly or view it on GitHub
#4773 (comment).

avatar dgt41
dgt41 - comment - 18 Oct 2014
avatar dgt41 dgt41 - close - 18 Oct 2014
avatar dgt41 dgt41 - close - 18 Oct 2014
avatar dgt41 dgt41 - change - 18 Oct 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-10-18 18:30:21
avatar brianteeman
brianteeman - comment - 18 Oct 2014

Thanks for working on this sorry it didn't work out
On 18 Oct 2014 20:30, "Dimitri Grammatiko" notifications@github.com wrote:

Closed #4773 #4773.


Reply to this email directly or view it on GitHub
#4773 (comment).

avatar dgt41
dgt41 - comment - 24 Oct 2014

@betweenbrain I think I fixed it!
@ghilo25 @zero-24 Can you test it one more time?

avatar dgt41 dgt41 - reopen - 24 Oct 2014
avatar dgt41 dgt41 - reopen - 24 Oct 2014
avatar dgt41 dgt41 - change - 24 Oct 2014
Status Closed New
avatar Bakual
Bakual - comment - 24 Oct 2014

I don't think you want to change 47 files, are you? :smile:

avatar dgt41
dgt41 - comment - 24 Oct 2014

@Bakual I have to redo this, right?

avatar Bakual
Bakual - comment - 24 Oct 2014

Looks like. But you don't necessary need to create a new PR.
I would do:
1. Create a new local branch whatever
2. Cherry-Pick the correct commits from warning_msg into whatever (or do it fresh)
3. Force-Push whatever to origin:warning_msg, overwriting the existing branch there.

avatar dgt41
dgt41 - comment - 24 Oct 2014

@Bakual is this ok now?

avatar Bakual
Bakual - comment - 24 Oct 2014

@dgt41 Looks perfect so far. Waiting for Travis to finish :smile:

avatar zero-24
zero-24 - comment - 31 Oct 2014

moving also on Jissues back to open. Looks like this is missing :smile:

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar jissues-bot
jissues-bot - comment - 31 Oct 2014

Set to "open" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/4773

avatar zero-24 zero-24 - change - 31 Oct 2014
Status Closed Pending
avatar dgt41
dgt41 - comment - 31 Oct 2014

@zero-24 ????

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar zero-24 zero-24 - test_item - 31 Oct 2014 - Tested successfully
avatar zero-24
zero-24 - comment - 31 Oct 2014

@test successful on

  • current FF with "Close the Browser Tab" and "Back Button" @note: Here it ist a browser only message (no Joomla Text but i think this is a browser implementation)

  • current Chrome with "Close the Browser Tab" and "Back Button" (here we see the joomla message text)

  • current Opera with "Close the Browser Tab" and "Back Button" (here we see the joomla message text)

  • IE11 with "Close the Browser Tab" and "Back Button" (here we see the joomla message text)

We need to test the other Supportet Browsers as well (IE8 + IE9 + IE10): http://docs.joomla.org/Joomla_Browser_Support

But for me all its ok now thanks @dgt41

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar dgt41
dgt41 - comment - 31 Oct 2014

@zero-24 it is documented that FF will NOT display any message (or any text supplied) https://developer.mozilla.org/en-US/docs/WindowEventHandlers.onbeforeunload
Nothing we can do here.
Also IE should not have a problem with this as it was fully supported from IE ver 6
screen shot 2014-10-31 at 11 33 45

avatar zero-24
zero-24 - comment - 31 Oct 2014

thanks again @dgt41 so we need only one more test. :+1:

avatar infograf768
infograf768 - comment - 1 Nov 2014

@test
Works here.
As the message in Firefox comes from the app itself, I do not know if it is translated in other languages.
(message displays in English here as I use an English version of Firefox)

avatar infograf768
infograf768 - comment - 1 Nov 2014

Hmm, I see another issue, specially for testers: It also displays the message when refreshing the page.

avatar zero-24
zero-24 - comment - 1 Nov 2014

Hmm, I see another issue, specially for testers: It also displays the message when refreshing the page.

@infograf768 i think this is expeced behavior maybe we can add a option to disable this feature for testing?

As the message in Firefox comes from the app itself, I do not know if it is translated in other languages.
(message displays in English here as I use an English version of Firefox)

Same here with German FF --> German Message. So it is ok :smile:

avatar infograf768
infograf768 - comment - 1 Nov 2014

@infograf768 i think this is expeced behavior maybe we can add a option to disable this feature for testing?

That would be awsome, but I can hear already people shouting if we add a new Parameter, although that one would be for the template style itself and not in Global Config

avatar dgt41
dgt41 - comment - 1 Nov 2014

@infograf768 Message should fire on 3 occasions: hitting the back button, closing the window (tab) and refreshing the page. Should never fire on any toolbar button or a form submission, which is the proper way to exit the edit screen.
About the switch: we can tight it to debug?

avatar infograf768
infograf768 - comment - 1 Nov 2014

@dgt41

About the switch: we can tight it to debug?

possibly.

avatar dgt41
dgt41 - comment - 1 Nov 2014

@zero-24 @infograf768 I went ahead and coupled the functionality with debug mode (it works when debug is off)

avatar infograf768
infograf768 - comment - 1 Nov 2014

Please also debug_lang

avatar dgt41
dgt41 - comment - 1 Nov 2014

@infograf768 with && or || operator?

if (<?php echo JFactory::getApplication()->get('debug'); ?> === 0 && <?php echo JFactory::getApplication()->get('debug_lang'); ?> === 0)

or

if (<?php echo JFactory::getApplication()->get('debug'); ?> === 0 || <?php echo JFactory::getApplication()->get('debug_lang'); ?> === 0)
avatar infograf768
infograf768 - comment - 1 Nov 2014

|| (or operator)
I explain why: Translation Teams (and testers) may need to check their translations on the fly and it would really be bothersome to click each time in the popup

avatar dgt41
dgt41 - comment - 1 Nov 2014

@infograf768 Fair enough, I realize that when debuging some features can be really painful…
Do you mind if I declare those two php variables like debugMode and debugLangMode` in the top of the file so that this line will be much sorter?

avatar infograf768
infograf768 - comment - 1 Nov 2014

do as you feel :)

avatar zero-24
zero-24 - comment - 2 Nov 2014

@test still successful with lastest changes. On more tester for RTC please.

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar infograf768
infograf768 - comment - 3 Nov 2014

OK here. I let to PLT the last word on this.

avatar roland-d
roland-d - comment - 14 Nov 2014

To get a word from the PLT on this, we probably should inform them ;) @Bakual @chrisdavenport @dbhurley Can we move this to RTC?

Looks good to me.

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4773.

avatar brianteeman brianteeman - change - 14 Nov 2014
Status Pending Needs Review
avatar Bakual
Bakual - comment - 15 Nov 2014

I'm quite sure I will hate it when testing things. But I can see the improvement as well. :smile:

avatar dgt41
dgt41 - comment - 15 Nov 2014

@Bakual No pain, no gain. I guess ????

avatar roland-d
roland-d - comment - 16 Nov 2014

The failure is simply because Travis couldn't connect to GitHub. Please test this PR again to make sure the code still works as expected. Thanks.

avatar smanzi
smanzi - comment - 3 Dec 2014

This thing is a godsend to me!

@test success on IE11, FF 34.0, Chrome 39.0.2171.71 for all supported conditions

avatar smanzi smanzi - test_item - 3 Dec 2014 - Tested successfully
avatar smanzi
smanzi - comment - 6 Dec 2014

@dgt41 Confirmed: last "glitches" are a thing of the past...
@test success

avatar dgt41
dgt41 - comment - 9 Dec 2014

@roland-d is there a PLT decision for this? Shall I keep it open?

avatar infograf768 infograf768 - change - 14 Dec 2014
Labels Added: ?
avatar wilsonge
wilsonge - comment - 14 Dec 2014

Personally (non-PLT decision) this shouldn't be a template behaviour in all cases where the menu is hidden. But it should be component by component. Because some 3rd party components may hide the menu but have their own version of this message etc. but in cases such as article editing I like the idea!

avatar dgt41
dgt41 - comment - 14 Dec 2014

@wilsonge Do you want me to introduce an option similar to hidemainmenu e.g. jailedform and tight it to this behavior?
Of course I’ll force all the core singular edits [that might end up with a need for check-in] follow this new behavior…

avatar smz
smz - comment - 14 Dec 2014

@dgt41 Dimitris, we have 20 views with JFactory::getApplication()->input->set('hidemainmenu', true); Will this mean to add JFactory::getApplication()->input->set('jailedform', true); to those 20 views? Quite feasible I would say, and this will give more flexibility and assure we don't break something else...

Cheers! Sergio

avatar dgt41
dgt41 - comment - 14 Dec 2014

@wilsonge I had an epiphany: how about introducing a behavior.lockedin ?
Pros:
This way the behavior is not coupled to any template
We can use it in front end as well
Cons:
One more js file
One more http request

avatar dgt41 dgt41 - close - 6 Jan 2015
avatar dgt41
dgt41 - comment - 6 Jan 2015

A new patch that will be per component is on its way thus I am closing this one

avatar dgt41 dgt41 - change - 6 Jan 2015
Status Needs Review Closed
Closed_Date 2014-10-18 18:30:21 2015-01-06 10:54:32
avatar dgt41 dgt41 - close - 6 Jan 2015
avatar dgt41 dgt41 - head_ref_deleted - 14 Aug 2015

Add a Comment

Login with GitHub to post a comment