Skip to content

Commit fac40a8

Browse files
authored
fix(ui5-calendar-header): prevent scrolling when month/year picker is selected (#2276)
1 parent 443af29 commit fac40a8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/main/src/CalendarHeader.hbs

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
</ui5-icon>
1818
</div>
1919

20-
<div class="ui5-calheader-midcontainer">
20+
<div
21+
class="ui5-calheader-midcontainer"
22+
@keydown="{{_onMidContainerKeyDown}}"
23+
>
2124
<div
2225
id="{{_id}}-btn1"
2326
class="ui5-calheader-arrowbtn ui5-calheader-middlebtn"

packages/main/src/CalendarHeader.js

+6
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ class CalendarHeader extends UI5Element {
131131
}
132132
}
133133

134+
_onMidContainerKeyDown(event) {
135+
if (isSpace(event)) {
136+
event.preventDefault();
137+
}
138+
}
139+
134140
static async onDefine() {
135141
await fetchI18nBundle("@ui5/webcomponents");
136142
}

0 commit comments

Comments
 (0)