angular / material

Material design for AngularJS
https://material.angularjs.org/
MIT License
16.54k stars 3.39k forks source link

calendar: inside of menu does not properly scroll to the date #10927

Open gatormike opened 7 years ago

gatormike commented 7 years ago

Actual Behavior:

CodePen (or steps to reproduce the issue): *

AngularJS Versions: *

Additional Information:

2017-10-06_10-36-52

gatormike commented 7 years ago

I know there has to be an easy solution, I just can't figure it out. :(

aner-perez commented 6 years ago

I tracked down the same issue that's happening in our code. As far as I can tell, the problem is occurring when the calendar is being scrolled to the current date. Setting a breakpoint in VirtualRepeatContainerController.prototype.scrollTo, you can see that the code tries to scroll to the current date by setting the scrollTop but right after scrollTop gets set, you can see that it is still 0. I thought it was not accepting a value for scrollTop because the clientHeight was set to 440540 and therefore scrolling was not necessary, but I couldn't get it to work even if I gave the scroller a fixed height.

Splaktar commented 6 years ago

I was able to reproduce this in an updated CodePen for 1.1.8.