Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown list inside Dialog is only partially visible and creates scroll on dialog #316

Closed
RobiFerentz opened this issue Feb 15, 2018 · 3 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@RobiFerentz
Copy link

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=57

Plunkr Case (Bug Reports)
https://plnkr.co/edit/wN3vm9aMCZo3LGdAHep2?p=preview

Current behavior

When placing a dropdown inside a dialog (especially close to the bottom of the dialog), the dropdown list is mostly hidden inside the bottom of the dialog and a scroll will now be visible.
This is obviously due to the overflow property of the dialog and the fact the list is inside the dropdown element.

Expected behavior

I would expect the list from the dropdown to be fully visible (floating above all other content) and cause layout changes to the containing dialog.

Minimal reproduction of the problem with instructions
Please see above plunkr link

Please tell us about your environment:

OSX, VS Code, yarn

  • React version:

16.2

  • PrimeReact version:

1.4.1

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Chrome

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    ES6/7
@alexey85
Copy link

@RobiFerentz add appendTo={document.body} to Dropdown

@RobiFerentz
Copy link
Author

RobiFerentz commented Feb 18, 2018

@alexey85 That seems to work, but then the onChange event is not propagated correctly, so I can't handle the the event.

@RobiFerentz
Copy link
Author

RobiFerentz commented Feb 18, 2018

I have updated the original plunker example.
It now contains 2 dropdowns, where the first is appended to the body.
You will notice the top one (appendTo document.body) does not call the change even when the value is selected.
The second dropwdown will expand into the modal scroll (not appended to body).

However, if you change the order of the Dropdowns, the append to body drop down will function as expected.
I believe the options dropdown list simply does not catch events when other focusable controls are behind it.

BTW, this seems to be an issue with all "dropdown" implementations in the package, including such controls as AutoComplete. Once appendTo is used and dropdown appears above other controls, the relevant events do not fire (onSelect, for example)

@Merve7 Merve7 self-assigned this Feb 28, 2018
@Merve7 Merve7 added the Type: Bug Issue contains a defect related to a specific component. label Feb 28, 2018
@Merve7 Merve7 added this to the 1.4.2 milestone Feb 28, 2018
@Merve7 Merve7 closed this as completed in b9bcb81 Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

3 participants