Skip to content

Commit 20487c4

Browse files
authored
fix: add missing uniqueIdPrefix to Lit date-picker version (#8256)
1 parent d5e20c6 commit 20487c4

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

packages/date-picker/src/vaadin-lit-date-picker.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,21 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
113113
super.ready();
114114

115115
this.addController(
116-
new InputController(this, (input) => {
117-
this._setInputElement(input);
118-
this._setFocusElement(input);
119-
this.stateTarget = input;
120-
this.ariaTarget = input;
121-
}),
116+
new InputController(
117+
this,
118+
(input) => {
119+
this._setInputElement(input);
120+
this._setFocusElement(input);
121+
this.stateTarget = input;
122+
this.ariaTarget = input;
123+
},
124+
{
125+
// The "search" word is a trick to prevent Safari from enabling AutoFill,
126+
// which is causing click issues:
127+
// https://github.com/vaadin/web-components/issues/6817#issuecomment-2268229567
128+
uniqueIdPrefix: 'search-input',
129+
},
130+
),
122131
);
123132
this.addController(new LabelledInputController(this.inputElement, this._labelController));
124133

0 commit comments

Comments
 (0)