Description of problem: After fill in some parameters on resources through Deploy Image, click other tab(Browse Catalog/Import YAML/JSON), will appear the 'unsaved' prompt. When click 'Cancel' button, will unexpectedly navigate away. Version-Release number of selected component (if applicable): OpenShift Master:v3.6.99 Kubernetes Master:v1.6.1+5115d708d7 How reproducible: Always Steps to Reproduce: 1.Login in web console,create new project 2.Click 'Add to Project'-> 'Deploy Image', select 'Image Stream Tag ' 3.fill in openshift/php:latest, update application name to php1 4.click Browse Catalog / Import YAML/JSON tab,will have the the 'unsaved' prompt 5.Click 'Cancel' on the dialog. Actual results: 5. Will unexpectedly navigate away. Expected results: 5. Should cancel the navigate away operation and stay on the current page Additional info: 1) The "Import YAML/JSON" tab has the same issue. When both Import YAML/JSON and Deploy Image have unsaved changes, trying to enter 'Browse Catalog' tab,the "unsaved" prompt will show two times. 2) Noticed the changes still exist after unexpectedlly navigate away,so I thought this place no need to create the additional "unsaved" prompt.
The free-int cluster has same issue Version: OpenShift Master: v3.6.100 (online version 3.5.0.20) Kubernetes Master: v1.6.1+5115d708d7
Commit pushed to master at https://github.com/openshift/origin-web-console https://github.com/openshift/origin-web-console/commit/0ae3bbfea6ba6c407afd390c809c4f5320289935 Bug 1460142 - Only use confirm-on-exit on some forms Use confirm-on-exit only on forms where the left navigation is visible or where you might have typed a lot of content, such as Edit YAML.
Per https://bugzilla.redhat.com/show_bug.cgi?id=1460122#c3,I checked this issues on the edit environment variables page (like Environment tab of deployment page),still hit this problem. Version(PR #1671 has merged into this version) OpenShift Master: v3.6.109 Steps to Reproduce: 1.Login in web console, create new project and php app. 2.Enter 'Application'->'Deployment'->'php',click 'Environment' tab 3.Fill in some parameters 4.Try to navigate other tab, such as 'Configuration'/'History' 5.Click 'Cancel' on the dialog. Actual results: 5. Will unexpectedly navigate away. Expected results: 5. Should cancel the navigate away operation and stay on the current page
We didn't mean to prompt when switching tabs since that doesn't lose your edits. You might need to look at something on another tab to know what environment variables to set. You should now only be prompted when leaving the page entirely. Fixed by https://github.com/openshift/origin-web-console/pull/1726
Commit pushed to master at https://github.com/openshift/origin-web-console https://github.com/openshift/origin-web-console/commit/910e642c0f8abdbe140b24ac7d3b7078fedf3dbe Bug 1460142 - Use $routeChangeStart for confirm-on-exit Listen for `$routeChangeStart` instead of `$locationChangeStart` in the `confirm-on-exit` directive. This prevents us from incorrectly prompting when the user switches tabs with `persist-tab-state` on. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1460142
Checked this issue on openshift v3.6.121, the bug was fixed. Please change bug status to ON_QA, thanks!