Commit 303984f
fix(material/autocomplete): autocomplete panel top is cut off in landscape mode (#28982)
* fix(material/autocomplete): autocomplete panel top is cut off in landscape mode
Fixes a bug in the Angular Material Autocomplete component where the
autocomplete panel listbox top is cut off by the device screen when being
viewed in landscape mode. This is because the listbox max-height is greater
than the distance between the top of the autocomplete input and the screen top.
Fixes b/284148377
* fix(material/autocomplete): autocomplete panel top is cut off in landscape mode
Fixes lint error from previous commit which fixes Angular Component's
autocomplete panel top from being cut off when viewed in landscape mode.
The previous max-height of the panel is more than the height of the panel
from the top of the input when in the bottom half to the top of the device's
screen.
Fixes b/284148377
* fix(material/autocomplete): autocomplete panel top cut off in landscape mode
Fixes a bug in the Angular Material Autocomplete component where the
autocomplete panel listbox is cut off by the device screen when being
viewed in landscape mode. This is because the CDK overlay does not
adjust its size based on the screen constraints when triggered.
Fixes b/284148377
* fix(material/autocomplete): autocomplete panel top cut off in mobile landscape mode
Fixes a bug in the Angular Material Autocomplete component where the
autocomplete panel top was being cut off by the screen in mobile
landscape mode. Updates previous fix to target adjustments on
HandsetLandscape only.
Fixes b/284148377
* refactor(material/autocomplete): autocomplete panel top cut off in mobile landscape mode
Removing unnecessary comments.
Fixes: b/284148377
* refactor(material/autocomplete): Injects Breakpoint to fix breaking tests
Fixes broken presubmit tests for Angular Component's Autocomplete
constructor by injecting BreakpointObserver rather than adding to the
constructor.
Fixes b/247881646
* fix(material/autocomplete): update style.bottom value for broken test
Fixes breaking Angular Component Autocomplete comoponent's autocomplete
spec.ts so that the value falls within an acceptable range based on the
new behavior of the autocomplete in landscape mode.
Fixes b/284148377
* fix(material/autocomplete): panel top gets cut off in mobile landscape view
Updates previous fix to unsubscribe from the _breakpointObserver on
ngOnDestroy.
Fixes b/284148377
* fix(material/autocomplete): autocomplete panel gets cut off in mobile landscape
Updates fix to autocomplete panel which was getting cut off in mobile landscape
by correctly assigning const isHandsetLandscape to the subscription result.matches
value and thus if isHandsetLandscape is true then applying flexible dimensions,
grow after open and with viewport margin to the panel on open.
Fixes b/284148377
* fix(material/autocomplete): autocomplete panel top cut off in mobile landscape
Fixes Angular Components autocomplete so that when the panel is open in
mobile landscape that it does not cut off at the top and the panel
resizes/adjusts according to the viewport. Updates the previous fix to
avoid subscribing to handsetLandscapeSubscription as a side effect.
Fixes b/284148377
* fix(material/autocomplete): resets autocomplete panel positionStrategy when not in mobile landscape
Updates the previous fix which checks for Breakpoint.HandsetLandscape and applies flexibleDimensions
withGrowAfterOpen and adds withViewportMargin and removes those values if Breakpoint.HandsetLandscape
is false.
Fixes b/284148377
* refactor(material/autocomplete): autocomplete panel cut off in mobile landscape
Updates BreakpointObserver import after rebasing latest changes.
Fixes b/284148377
(cherry picked from commit 008212a)1 parent 9869f92 commit 303984f
File tree
2 files changed
+28
-1
lines changed- src/material/autocomplete
2 files changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
| 290 | + | |
285 | 291 | | |
286 | 292 | | |
287 | 293 | | |
| |||
790 | 796 | | |
791 | 797 | | |
792 | 798 | | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
793 | 819 | | |
794 | 820 | | |
795 | 821 | | |
| |||
881 | 907 | | |
882 | 908 | | |
883 | 909 | | |
| 910 | + | |
884 | 911 | | |
885 | 912 | | |
886 | 913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
2186 | | - | |
| 2186 | + | |
2187 | 2187 | | |
2188 | 2188 | | |
2189 | 2189 | | |
| |||
0 commit comments