materialize icon indicating copy to clipboard operation
materialize copied to clipboard

"select" control inside "modal" makes the scroll

Open acheshkov opened this issue 11 years ago • 40 comments

The "select" control inside modal window at open state makes the scroll and not all values of select are visible. I exprect no scroll and all values of dropdowned list are visible.

menu_101

acheshkov avatar Jun 15 '15 05:06 acheshkov

this is duplicated in #1713

jsduffy avatar Jul 21 '15 13:07 jsduffy

This issue has been discussed already in https://github.com/Dogfalo/materialize/issues/1385

carlosperate avatar Jul 25 '15 14:07 carlosperate

I think this issue now fixed. Could you please verify ?

Tim-arts avatar Jan 18 '16 17:01 Tim-arts

This issue still is present in the current version.

JoostvdB94 avatar May 13 '16 08:05 JoostvdB94

Commit above is still not a perfect solution, but suits my problem. It limits any dropdown height if placed inside .modal to height of .modal-content. As you can see below there're two possible issues left:

  • [ ] when you switch from one select to another they will still get 'full-height'
  • [ ] when select is placed at bottom of modal and it will not fit upwards, it will be rendered as usual with default max-height

Screencast

SPodjasek avatar Sep 16 '16 10:09 SPodjasek

+1, Tried making the position:fixed for select-dropdown, the options now render above modal, but I can't place the dropdown under the select input.

justinjoyn avatar Jan 31 '17 03:01 justinjoyn

This is still an issue. I have the same problem but in my case the dropdown drops up and cuts of in a .bottom-sheet modal. I cant even select the items thats listed over the top of the modal.

untitled

.modal {
  overflow: visible;
}

Shows the whole select but then i will lose overflow: scroll of the .bottom-sheet.

yoieh avatar Mar 07 '17 09:03 yoieh

I'm also affected by this issue. : /

imaia avatar Jul 20 '17 16:07 imaia

If I use .modal { overflow:visible; } in case of content overflow the modal not scroll

arredgroup avatar Aug 03 '17 18:08 arredgroup

Fixed in v1-dev

Dogfalo avatar Oct 10 '17 00:10 Dogfalo

@Dogfalo can you tell me where I have to apply the fix. Because I don't want to upgrade the api. I am using version v0.98.1

VicJohn avatar Nov 06 '17 13:11 VicJohn

This issue still is present in the current version.

adhenrique avatar Feb 09 '18 16:02 adhenrique

Yup. this bug is still present in v0.100.2

benNek avatar Feb 11 '18 12:02 benNek

@adhenrique when you say current version, do you mean in the v1 branch @Dogfalo referenced, or in one of the v0.X releases? The former means this should issue be reopened.

carusology avatar Feb 11 '18 23:02 carusology

@carusology yeah. I refer to v1-dev, which the dogfalo commented and also master branch.

adhenrique avatar Feb 14 '18 16:02 adhenrique

If you are on the latest build, use the container option added in 0c703faa0fd60c96d5232ba7e33d36309b943698

Dogfalo avatar Feb 14 '18 16:02 Dogfalo

@Dogfalo hmm. Like this? $('select').select({ dropdownOptions: { container: '.modal-content', } });

adhenrique avatar Feb 14 '18 17:02 adhenrique

instead of the selector in the container, you should pass in the element directly

Dogfalo avatar Feb 14 '18 18:02 Dogfalo

@Dogfalo I did not understand. Can u provide a simple code pls? I reviewed the docs from v1.0, but there is not instructions about this...

adhenrique avatar Feb 14 '18 19:02 adhenrique

This is what we do for the Select inside the Datepicker

M.Select.init(yearSelect, {classes: 'select-year', dropdownOptions: {container: document.body, constrainWidth: false}});

Dogfalo avatar Feb 14 '18 19:02 Dogfalo