File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 </ script >
1111 </ head >
1212 < body >
13- < vaadin-select > </ vaadin-select >
13+ < vaadin-select label =" Size " > </ vaadin-select >
1414
1515 < script >
1616 const select = document . querySelector ( 'vaadin-select' ) ;
Original file line number Diff line number Diff line change @@ -489,13 +489,9 @@ class Select extends DelegateFocusMixin(FieldMixin(SlotMixin(ElementMixin(Themab
489489
490490 this . _menuElement . focus ( ) ;
491491 } else if ( wasOpened ) {
492- if ( this . _phone ) {
493- this . _setFocused ( false ) ;
494- } else {
495- this . focus ( ) ;
496- if ( this . _openedWithFocusRing ) {
497- this . setAttribute ( 'focus-ring' , '' ) ;
498- }
492+ this . focus ( ) ;
493+ if ( this . _openedWithFocusRing ) {
494+ this . setAttribute ( 'focus-ring' , '' ) ;
499495 }
500496 this . validate ( ) ;
501497 }
Original file line number Diff line number Diff line change @@ -375,19 +375,19 @@ describe('vaadin-select', () => {
375375 expect ( focusedSpy . called ) . to . be . true ;
376376 } ) ;
377377
378- it ( 'should remove focused state on closing the overlay if phone' , ( ) => {
378+ it ( 'should restore focused state on closing the overlay if phone' , ( ) => {
379379 select . _phone = true ;
380380 click ( select . _items [ 1 ] ) ;
381- expect ( select . hasAttribute ( 'focused' ) ) . to . be . false ;
381+ expect ( select . hasAttribute ( 'focused' ) ) . to . be . true ;
382382 } ) ;
383383
384- it ( 'should not focus the button on closing the overlay if phone' , ( ) => {
384+ it ( 'should focus the button on closing the overlay if phone' , ( ) => {
385385 const focusedSpy = sinon . spy ( ) ;
386386 select . focusElement . focus = focusedSpy ;
387387
388388 select . _phone = true ;
389389 click ( select . _items [ 1 ] ) ;
390- expect ( focusedSpy . called ) . to . be . false ;
390+ expect ( focusedSpy . called ) . to . be . true ;
391391 } ) ;
392392
393393 it ( 'should focus the button before moving the focus to next selectable element' , ( ) => {
You can’t perform that action at this time.
0 commit comments