eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

'Your changes will not be saved' alert window when trying to reload a web page #16100

Closed SkorikSergey closed 4 years ago

SkorikSergey commented 4 years ago

Describe the bug

'Your changes will not be saved' alert window when trying to reload web page. The cause of this issue are https://github.com/eclipse/che-theia/pull/634 changes

Che version

Steps to reproduce

  1. Start workspace from any devfile.
  2. Try to reload web page.

Expected behavior

The page was reloaded

Runtime

Screenshots

screencast-che-eclipse-che 10 33 177 124 nip io-2020 02 21-12_34_51

Installation method

Environment

rhopp commented 4 years ago

@SkorikSergey This is not a bug and the tests needs to be adapted, right?

vzhukovs commented 4 years ago

@rhopp yes, seems, that tests have to be aligned to the new behavior.

vzhukovs commented 4 years ago

@SkorikSergey another question, is this a manual testing scenario?

As far as I saw, Happy Path scenario passed successfully:

Configure application confirmExit to always as default by vzhukovskii · Pull Request #634 · eclipse:che-theia 2020-02-21 17-12-44
SkorikSergey commented 4 years ago

HappyPath doesn't reload page. There is tests result with failed tests - https://ci.codenvycorp.com/view/qa-nightly/job/che-integration-tests-multiuser-master-ocp/946/Selenium_20tests_20report/.

rhopp commented 4 years ago

@vzhukovskii This failure is happenig in the legacy java-selenium suite. We still have some tests there... They run as PR check on eclipse/che repo and right now, they are kind of "hidden" - We have a task in the current sprint to improve the reporting from this job.

SkorikSergey commented 4 years ago

This issue (https://github.com/eclipse/che/issues/13580) is about closing only terminal tab not browser tab. For now if type Ctrl + w in terminal and click Leave button browser tab will be closed. screencast-10 33 177 124_8443-2020 02 21-17_22_54

vzhukovs commented 4 years ago

Theia handles Cmd/Ctrl+W only for tab close, we can't modify this behavior for handling only some part, e.g. terminal tab, or editor tab. We just can intercept this hotkey and prevent browser tab closing. (As this hotkey is reserved in browsers). So that's why there was added overridden configuration item to preferences that asks user whether he wants to close tab or not.

This issue (#13580) is about closing only terminal tab not browser tab.

Expected: Ideal behavior would be the same as in native terminal - last word is erased, but I afraid whether it is possible to override such browser hotkey. So, at least a confirmation dialog should be shown before closing, because it's a typical thing when user press ctrl+w in terminal and does not to close tab.

rhopp commented 4 years ago

IMHO this behavior change is "UX downgrade". In my opinion, the confirmation should appear only when data loss is at place (aka. some editor is not saved).

Anyway... Until this gets sorted, @SkorikSergey we can put back the previous behavior by setting this in user preferences before actually running the test (the same way, that @Ohrimenko1988 is doing this for example for setting the terminal type to dom)

Katka92 commented 4 years ago

This issue is a root cause of failures for nightly tests with the nightly image. I assume @SkorikSergey is fixing that in Java tests, so I will do that for typescript ones.

amisevsk commented 4 years ago

@rhopp As a user of Che, "ctrl-w to close your whole IDE" was maybe my least favorite thing about Theia :). When typing in a terminal, ctrl-w is one of the hardest habits to break.