@@ -316,26 +316,14 @@ export const ComboBoxMixin = (subclass) =>
316
316
return 'vaadin-combo-box' ;
317
317
}
318
318
319
- /**
320
- * Get a reference to the native `<input>` element.
321
- * Override to provide a custom input.
322
- * @protected
323
- * @return {HTMLInputElement | undefined }
324
- */
325
- get _nativeInput ( ) {
326
- return this . inputElement ;
327
- }
328
-
329
319
/**
330
320
* Override method inherited from `InputMixin`
331
321
* to customize the input element.
332
322
* @protected
333
323
* @override
334
324
*/
335
- _inputElementChanged ( inputElement ) {
336
- super . _inputElementChanged ( inputElement ) ;
337
-
338
- const input = this . _nativeInput ;
325
+ _inputElementChanged ( input ) {
326
+ super . _inputElementChanged ( input ) ;
339
327
340
328
if ( input ) {
341
329
input . autocomplete = 'off' ;
@@ -352,10 +340,6 @@ export const ComboBoxMixin = (subclass) =>
352
340
input . setAttribute ( 'autocorrect' , 'off' ) ;
353
341
354
342
this . _revertInputValueToValue ( ) ;
355
-
356
- if ( this . clearElement ) {
357
- this . clearElement . addEventListener ( 'mousedown' , this . _boundOnClearButtonMouseDown ) ;
358
- }
359
343
}
360
344
}
361
345
@@ -371,6 +355,10 @@ export const ComboBoxMixin = (subclass) =>
371
355
this . addEventListener ( 'click' , this . _boundOnClick ) ;
372
356
this . addEventListener ( 'touchend' , this . _boundOnTouchend ) ;
373
357
358
+ if ( this . clearElement ) {
359
+ this . clearElement . addEventListener ( 'mousedown' , this . _boundOnClearButtonMouseDown ) ;
360
+ }
361
+
374
362
const bringToFrontListener = ( ) => {
375
363
requestAnimationFrame ( ( ) => {
376
364
this . _overlayElement . bringToFront ( ) ;
@@ -557,7 +545,7 @@ export const ComboBoxMixin = (subclass) =>
557
545
558
546
/** @private */
559
547
_updateActiveDescendant ( index ) {
560
- const input = this . _nativeInput ;
548
+ const input = this . inputElement ;
561
549
if ( ! input ) {
562
550
return ;
563
551
}
@@ -589,7 +577,7 @@ export const ComboBoxMixin = (subclass) =>
589
577
this . _onClosed ( ) ;
590
578
}
591
579
592
- const input = this . _nativeInput ;
580
+ const input = this . inputElement ;
593
581
if ( input ) {
594
582
input . setAttribute ( 'aria-expanded' , ! ! opened ) ;
595
583
0 commit comments