Bug 1602331

Summary: [converged] Dialogue box disappears when click out of the box
Product: OpenShift Container Platform Reporter: Yanping Zhang <yanpzhan>
Component: Management ConsoleAssignee: Steve Goodwin <sgoodwin>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, jkleiner, jokerman, mmccomas, spadgett
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The default closing behavior, for web console modals, is to close if the user clicks outside of the modal, Cancel, Save, or esc key. Consequence: This can cause accidental data loss, in certain modals that contain editing forms with multiple fields, if the user inadvertently clicks outside. Fix and result: Closing the following modals requires the user to click Cancel, Save, or esc key. Edit Labels, Annotations, Adding a Secret, Update Pod Selector, Create Namespace
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:40:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yanping Zhang 2018-07-18 08:18:23 UTC
Description of problem:
There are dialogue boxes on console, if user clicks out of the dialogue box accidentally, the box disappears automatically.

Version-Release number of selected component (if applicable):
docker.io/openshift/origin-console                                          latest              5188f5035cee        6 hours ago         259 MB
openshift v3.10.18

How reproducible:
Always

Steps to Reproduce:
1.Create a deploymentconfig on console.
2.On the dc page, open a dialogue by click "Action"->"Modify Labels".
3.Click out of the dialogue box.

Actual results:
3.The dialogue box disappears automatically

Expected results:
3.Should not close the dialogue box unless click "Cancel" or "Save" button on the box.

Additional info:

Comment 1 Samuel Padgett 2018-07-18 12:12:55 UTC
Marking this low because I think the current behavior is reasonable even if we decide to change it. The drawback is that you can lose what you typed if you dismiss the dialog accidentally.

Comment 2 Samuel Padgett 2019-03-18 19:30:45 UTC
https://github.com/openshift/console/pull/1303

Comment 3 Samuel Padgett 2019-03-18 19:31:13 UTC
*** Bug 1688956 has been marked as a duplicate of this bug. ***

Comment 5 Yanping Zhang 2019-03-20 05:02:37 UTC
4.0.0-0.nightly-2019-03-19-004004
console image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:68bb907ad7ac33aa7a9a5d0a3cabd7180a0efe09d5d41d33ed280420cc1ce238
io.openshift.build.commit.url=https://github.com/openshift/console/commit/bddf50c90ba2c2ed12658af993bdc30763866723

Checked on ocp 4.0 env with above version info. Clicking out of modal will not close the modal automatically for some functions, eg, modals for editing label/annotations/deletion and so on. 
But there are still other modals which have the issue: 1. Click one image on "Developer Catalog", then click out of the modal; 2. Click out of modals for "Edit Count", "Edit Update Strategy" of deplymong/dc page,

Comment 6 Samuel Padgett 2019-03-20 14:42:36 UTC
This is intentional. We purposely only applied this to modals with several input fields. It's nice to be able to click outside the modal when you won't lose data and preferred in most cases. "Edit Update Strategy" is borderline, but I think it's simple enough where it makes sense to keep to be able to click outside to dismiss. It only has two input values.

Ideally we would only block if you changed something in the dialog, but that's a larger change not part of this fix.

Comment 7 Yanping Zhang 2019-03-21 01:24:36 UTC
According to Comment 5 and Comment 6, the bug has been fixed, so move it to Verified. Thanks!

Comment 9 errata-xmlrpc 2019-06-04 10:40:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0758