Skip to content

Commit

Permalink
primefaces#7149 Clicking icon in advanced fileupload button does not …
Browse files Browse the repository at this point in the history
…open filechooser

The icon in the "Choose" button of the advanced fileupload button is
positioned absolute and is defined after the <input type="file">
element, which is also position=absolute.

So when a click is done in the region of the icon, the event is not
recorded on the file upload element, but on the icon and thus swallowed.

The solution is to raise the file element over the other elements via
a z-index style. This is considered to be save, as the button creates
a new stacking context.
  • Loading branch information
matthiasblaesing committed May 9, 2019
1 parent cac1e61 commit a2d97df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/components/fileupload/fileupload.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
filter: alpha(opacity=0);
direction: ltr;
cursor: pointer;
z-index: 1;
}

.ui-fileupload-choose.ui-fileupload-choose-selected input[type=file] {
Expand Down

0 comments on commit a2d97df

Please sign in to comment.