angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.23k stars 6.7k forks source link

docs-bug(cdkDrag): List examples' auto scroll is not working on devices narrower than 721px #26476

Open Totati opened 1 year ago

Totati commented 1 year ago

Documentation Feedback

Dragging a list element of an example like connected sorting group and moving the item near the page border won't trigger auto scroll on pages narrower than 721px. Resize the page to 721px or wider and it will work again. Last time it worked seems to be in vesion 8 and it looks like it's caused by this flex-basis: auto property

Affected documentation page

https://material.angular.io/cdk/drag-drop/examples

Aditya-13 commented 1 year ago

Hey @Totati , i think the issue is fixed now. You can check and close this issue.

Totati commented 1 year ago

@Aditya-13, I can reproduce it with version 16.0.2 still.

simonzea commented 11 months ago

@Totati hey, is anybody working on it ? Otherwise i can try to fix it if you dont mind.

simonzea commented 11 months ago

Hey ! what i found looking into this bug is that is no a problem whit angular material cdk but with the web page where is displayed (https://github.com/angular/material.angular.io). There is a media class call.

@media (max-width: 720px) .docs-component-viewer-sidenav-container { flex: 1 0 auto; }

and this is affecting the auto scroll, if we remove the auto property (flex-basis).

@media (max-width: 720px) .docs-component-viewer-sidenav-container { flex: 1 0; }

works as expected, i will try to create an issue and a pr there.

Xender007 commented 6 months ago

I tried in 17.0.5 and It's working as expected. please check and close this issue. Let me know if you find anything else @Totati.

Totati commented 6 months ago

@Xender007 it's still not working for me, did you shrink your viewport?

GiftLanga commented 3 months ago

@Xender007 I was able to reproduce the bug on version 17.3.1

When I inspect I see that the css class hasn't been updated. image

@simonzea was your fix merged for release?

abonvalle commented 1 month ago

@Totati Is it still not working? I couldn't reproduce and I didn't find the docs-component-viewer-sidenav-container class

Totati commented 1 month ago

I can reproduce it in 17.3.6 and 18.0.0