Bug 1934323

Summary: [Machines]Some dialogs close/get submitted when pressing enter while having focus in a dialog field
Product: Red Hat Enterprise Linux 8 Reporter: Xianghua Chen <xchen>
Component: cockpit-appstreamAssignee: Katerina Koukiou <kkoukiou>
Status: CLOSED ERRATA QA Contact: Xianghua Chen <xchen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.4CC: mmarusak, skobyda, wshi, ymao, yunyang
Target Milestone: rc   
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 247 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 17:53:43 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 Xianghua Chen 2021-03-03 01:11:13 UTC
Description of problem: 
The "Add disk" dialog disappear when press enter for "Custom path"

Version-Release number of selected component (if applicable):
cockpit-machines-238.1-1.el8.noarch
libvirt-dbus-1.3.0-2.module+el8.3.0+6423+e4cb6418.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare an shutdown VM, and a disk file 

2. F12, Clear site data under Application, refresh the VM details page

3. Click Add Disk , click "Custom path", Input the custom path with the prepared disk file,  click Add.



Actual results:
The "Add disk" dialog disappear and back to VM details page



Expected results:
The Custom path can be input after enter.

Additional info:
If yo try the second time, there will be no problem. So it only happens after clear site data.

Comment 1 Katerina Koukiou 2021-03-04 18:26:10 UTC
This seem to be not only related to machines page but extends to dialogs in other pages. I was able to reproduce  specifically with two dialogs in the storage page (did not try anywhere else):

The dialogs I reproduced this issue at as well where the following:

* Rename volume group
* Grow logical volume

Comment 2 Katerina Koukiou 2021-07-01 13:28:28 UTC
Fix posted upstream: https://github.com/cockpit-project/cockpit-machines/pull/229

Comment 3 Simon Kobyda 2021-07-01 22:46:29 UTC
Incorrect url. The fix is not #229, but #235:

https://github.com/cockpit-project/cockpit-machines/pull/235

Comment 8 Xianghua Chen 2021-08-14 02:09:24 UTC
Verified with packages:
cockpit-machines-250-1.el8.noarch
cockpit-machines-250-1.el8.noarch
libvirt-dbus-1.3.0-2.module+el8.3.0+6423+e4cb6418.x86_64

Steps:
1. Prepare an shutdown VM, and a disk file 
2. F12, Clear site data under Application, refresh the VM details page
3. Click Add Disk , click "Custom path", Input the custom path with the prepared disk file, press enter, click Add.

The  "Add disk" dialog is not closed after press enter in step3, but closed after click Add, and disk is added correctly.
So verified.

Comment 10 errata-xmlrpc 2021-11-09 17:53:43 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 (cockpit-appstream bug fix and enhancement update), 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-2021:4178