material icon indicating copy to clipboard operation
material copied to clipboard

md-select broken in build when inside md-content element

Open hodeyp opened this issue 11 years ago • 61 comments

looks like an md-content with a layout attribute causes the select to do weird things...

http://plnkr.co/edit/vAaWq8r1zIgmMnouwHij?p=preview

hodeyp avatar Apr 17 '15 08:04 hodeyp

+1 I definitely can't use 0.9.0-rc1 until this is fixed.

I looked into it a bit and It seems the following styles are added to the first div within md-content. Removing them fixes md-content being expanding horizontally causing a scroll bar. image For formatting's sake here they are in text

  overflow: hidden;
  position: fixed;
  width: 100%;
  padding-top: 0px;
  top: 64px;

epelc avatar Apr 17 '15 13:04 epelc

The select positioning and width are fine if you do not have any layout attibutes on or between your md-content and your md-select. However it still adds the css in my above comment which breaks md-contents width.

epelc avatar Apr 17 '15 13:04 epelc

This also really breaks md-select if you use it in a dialog. image

epelc avatar Apr 17 '15 13:04 epelc

I seem to be having the same problem, even without any layout attributes. The z-index is acting a little bit funny.

capture

loykianos avatar Apr 17 '15 13:04 loykianos

@epelc have you tested on master yet? If not, can you give it a go and see if it's resolved.

rschmukler avatar Apr 17 '15 18:04 rschmukler

this is definitely still an issue on master

hodeyp avatar Apr 17 '15 18:04 hodeyp

@rschmukler Just checked same problem. I'll be on gitter if you want any help debugging

epelc avatar Apr 17 '15 18:04 epelc

@hodeyp and @epelc working on it now, should have something soon. Sorry for the bug. Disabling scrolling in a consistent, cross browser compatible way, is bit tricky.

rschmukler avatar Apr 17 '15 19:04 rschmukler

@rschmukler hate to disappoint but still not working - my original plunker above still suffers from disappearing elements when the select is shown.

hodeyp avatar Apr 17 '15 21:04 hodeyp

I also tried to update and I still have weird template reactions when opening the selectbox. See bellow.

Before: before

After: after

loykianos avatar Apr 18 '15 14:04 loykianos

Try using master so you get @rschmukler's fix

epelc avatar Apr 18 '15 14:04 epelc

I am, and I updated a few hours ago. Tried again just now, same result.

loykianos avatar Apr 18 '15 14:04 loykianos

@loykianos - Please provide a CodePen or Plunkr that demonstrates this issue. @epelc, @hodeyp - have the fixes in #master resolved this issues for you?

ThomasBurleson avatar Apr 18 '15 15:04 ThomasBurleson

There you go, http://plnkr.co/edit/j8RqpRtNnzAyKjX3DnC8?p=preview

Still having the same problem with no extra CSS added.

loykianos avatar Apr 18 '15 15:04 loykianos

@ThomasBurleson This fixed all of my problems besides one but I found a work around.

I had a class which adding padding-left/right: 5% on my md-content for larger devices but it caused my fab button to be cut off graphically whenever I opened a select. I fixed it by adding margin-left/right: 5% to my md-card's instead which gave me the same padding/margin effect.

epelc avatar Apr 18 '15 16:04 epelc

sorry, still not working for me, and the plunker still shows the same issue.

http://plnkr.co/edit/vAaWq8r1zIgmMnouwHij?p=preview

hodeyp avatar Apr 18 '15 16:04 hodeyp

@ThomasBurleson I just noticed $window isn't firing resize events after I open and close an md-select.

edit - Well it seems to break any listeners I had on it. But if I change pages my listener works again until I open another select.

epelc avatar Apr 18 '15 17:04 epelc

I'm having this issue with version 0.9.0-rc1 but not with 0.8.3.

FelAmine avatar Apr 18 '15 21:04 FelAmine

Broken in dialog on #master. Removing md-content provides workaround but is contrary to md-dialog docs that say you should use md-content.

jsteenkamp avatar Apr 20 '15 02:04 jsteenkamp

Master is still broken for me in Firefox and chrome, it breaks the layout when used in dialogues and also breaks $window.resize listeners.

The Layout was okay in master-f3c113c (but it still broke the listeners) when using chrome, now its broken in Firefox and Chrome (even though the results are a bit different.)

In Firefox the elements in the dialogue are all over the place (outside the dialogue) when opening the select and the actual select is above the dialogue. In Chrome the dialogue becomes empty and the select is shown on the right side outside of the dialogue.

0.8.3 worked mostly fine, only Firefox showed some scrollbars on the body while opening the md-select.

Tyrannmisu avatar Apr 20 '15 06:04 Tyrannmisu