Bug 1539840

Summary: Using Drag and Drop to load a file the drag-and-drop area is not shown properly
Product: OpenShift Container Platform Reporter: Jakub Hadvig <jhadvig>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, jforrest, jokerman, mmccomas, spadgett, yapei
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-05 13:45:53 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:
Attachments:
Description Flags
screenshot none

Description Jakub Hadvig 2018-01-29 17:41:31 UTC
Created attachment 1387931 [details]
screenshot

Description of problem:
When trying to drag-and-drop a file into any instance of osc-file-input directive, the drag-and-drop area is not shown properly.

Version-Release number of selected component (if applicable):
Openshift v3.9.0-alpha.3+9ab7a71-232

How reproducible:
Always

Steps to Reproduce:
1. Go to Create Secret page.
2. Check both 'Use a custom ca.crt file' and 'Use a custom .gitconfig file' checkboxes.
3. Drag and Drop file on the either 'CA Certificate File' or 'Git Configuration File' area.

Actual results:
The shown drag-and-drop areas are moved under where the area should be, which is the area of input field + textarea 

Expected results:
The drag-and-drop areas should be shown as they are designed to show, which is input field + textarea


Additional info:

Comment 2 Yadan Pei 2018-01-31 02:38:18 UTC
I can reproduce the issue on free-int v3.9.0-0.33.0 

Unable to upload files to 'CA Certificate File' using drag and drop
While uploading files to 'Git Configuration File', content was put in 'CA Certificate File' after key mouse released

Comment 3 openshift-github-bot 2018-01-31 12:12:01 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/6ec0432181ce1e22fe8cc2ca4d08301906353f8f
Bug 1539840: Drag and Drop area zone should use absolute positioning

https://github.com/openshift/origin-web-console/commit/c5bb9ada6e7b73ba9355c7aad7b56cb6981af440
Merge pull request #2739 from jhadvig/bz1539840

Automatic merge from submit-queue.

Bug 1539840: Drag and Drop zone area should use absolute positioning

Also adjust the size of the drop and drop zone area to not include the label height.
With the label height:
![incorrect](https://user-images.githubusercontent.com/1668218/35576654-d38878fc-05df-11e8-9483-33e048b47acd.png)

Without it:
![correct](https://user-images.githubusercontent.com/1668218/35576662-d84a3fba-05df-11e8-9218-833450db0e85.png)

Tested the change on osc-file-input used in modal and non-modal html and both Chrome and FF 

@jwforres PTAL

Comment 4 Jakub Hadvig 2018-01-31 12:46:21 UTC
Fixing PR: https://github.com/openshift/origin-web-console/pull/2739

Comment 6 Yadan Pei 2018-02-05 03:19:28 UTC
The Drag & Drop function works well on v3.9.0-0.36.0, and Drag & Drop area is correct

Move to VERIFIED