Skip to content

fix(docs): Automatic scrolling fails on screens smaller than 721px - #31037

Merged
crisbeto merged 1 commit into
angular:mainfrom
yousafravian:fix/cdk-drag-drop-auto-scroll-mobile
May 6, 2025
Merged

fix(docs): Automatic scrolling fails on screens smaller than 721px#31037
crisbeto merged 1 commit into
angular:mainfrom
yousafravian:fix/cdk-drag-drop-auto-scroll-mobile

Conversation

@yousafravian

Copy link
Copy Markdown
Contributor

Fixes a flexbox issue where if a flex item has flex-basis: auto and min-height: auto, it exceeds the height of its flex parent. Consequently, when scrollBy is called by scrollDetector in drop-list-ref.ts, the container is not scrollable because its height is determined by its content. Removing min-height: auto forces the flex item to match the height of its flex parent, allowing scrollBy to function correctly.

Fixes#26476

…e to flexbox behavior
Fixes a flexbox issue where if a flex item has `flex-basis: auto` and `min-height: auto`, it exceeds the height of its flex parent. Consequently, when `scrollBy` is called by `scrollDetector` in `drop-list-ref.ts`, the container is not scrollable because its height is determined by its content. Removing `min-height: auto` forces the flex item to match the height of its flex parent, allowing `scrollBy` to function correctly.
Fixesangular#26476
@yousafravian
yousafravian requested a review from a team as a code ownerMay 6, 2025 07:10
@yousafravian
yousafravian requested review from andrewseguin and crisbeto and removed request for a teamMay 6, 2025 07:10
@angular-robotangular-robotBot added the area: docs Related to the documentation label May 6, 2025
@crisbeto
crisbeto removed the request for review from andrewseguinMay 6, 2025 08:55
@crisbetocrisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels May 6, 2025
@crisbeto
crisbeto merged commit 8cf7615 into angular:mainMay 6, 2025
@crisbeto

Copy link
Copy Markdown
Member

The changes were merged into the following branches: main, 19.2.x, 20.0.x

crisbeto pushed a commit that referenced this pull request May 6, 2025
…e to flexbox behavior (#31037)
Fixes a flexbox issue where if a flex item has `flex-basis: auto` and `min-height: auto`, it exceeds the height of its flex parent. Consequently, when `scrollBy` is called by `scrollDetector` in `drop-list-ref.ts`, the container is not scrollable because its height is determined by its content. Removing `min-height: auto` forces the flex item to match the height of its flex parent, allowing `scrollBy` to function correctly.
Fixes#26476
(cherry picked from commit 8cf7615)
crisbeto pushed a commit that referenced this pull request May 6, 2025
…e to flexbox behavior (#31037)
Fixes a flexbox issue where if a flex item has `flex-basis: auto` and `min-height: auto`, it exceeds the height of its flex parent. Consequently, when `scrollBy` is called by `scrollDetector` in `drop-list-ref.ts`, the container is not scrollable because its height is determined by its content. Removing `min-height: auto` forces the flex item to match the height of its flex parent, allowing `scrollBy` to function correctly.
Fixes#26476
(cherry picked from commit 8cf7615)
wildcardalice pushed a commit to wildcardalice/components that referenced this pull request May 12, 2025
…e to flexbox behavior (angular#31037)
Fixes a flexbox issue where if a flex item has `flex-basis: auto` and `min-height: auto`, it exceeds the height of its flex parent. Consequently, when `scrollBy` is called by `scrollDetector` in `drop-list-ref.ts`, the container is not scrollable because its height is determined by its content. Removing `min-height: auto` forces the flex item to match the height of its flex parent, allowing `scrollBy` to function correctly.
Fixesangular#26476
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-botangular-automatic-lock-botBot locked and limited conversation to collaborators Jun 6, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: mergeThe PR is ready for merge by the caretakerarea: docsRelated to the documentationtarget: patchThis PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants

@yousafravian@crisbeto