Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/main/src/TimeSelectionClocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ class TimeSelectionClocks extends TimePickerInternals {
const toggleSpinButtonTarget = evt.target && (evt.target as HTMLElement).tagName.toLowerCase().indexOf("segmented") === -1;

if (isEnter(evt)) {
// If Enter is pressed on AM/PM segmented button, apply the period change first
if (this._amPmFocused) {
const buttonAmPm = this._buttonAmPm();
const selectedItem = buttonAmPm?.selectedItems[0];
if (selectedItem?.textContent) {
this._calculatePeriodChange(selectedItem.textContent);
}
}
// Accept the time and close the popover
this.fireDecoratorEvent("close-picker");
} else if (isSpace(evt) && toggleSpinButtonTarget && !this._spacePressed) {
Expand Down
Loading