File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
testing/tests/DevExpress.ui.widgets.editors Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,17 @@ const SelectBox = (DropDownList as any).inherit({
4949
5050 return extend ( { } , parent , {
5151 tab ( ) {
52- if ( this . option ( 'opened' ) && ! this . _popup . getFocusableElements ( ) . length ) {
52+ const { opened } = this . option ( ) ;
53+ const popupHasFocusableElements = opened && ! ! this . _popup . getFocusableElements ( ) . length ;
54+ if ( ! popupHasFocusableElements ) {
5355 this . _resetCaretPosition ( true ) ;
5456 }
5557
5658 parent . tab && parent . tab . apply ( this , arguments ) ;
5759
58- this . _cancelSearchIfNeed ( ) ;
60+ if ( ! popupHasFocusableElements ) {
61+ this . _cancelSearchIfNeed ( ) ;
62+ }
5963 } ,
6064 upArrow ( e ) {
6165 if ( parent . upArrow . apply ( this , arguments ) ) {
Original file line number Diff line number Diff line change @@ -2726,6 +2726,28 @@ QUnit.module('keyboard navigation', {
27262726 assert . ok ( keyDownStub . calledOnce , 'keydown handled' ) ;
27272727 assert . ok ( keyUpStub . calledOnce , 'keyup handled' ) ;
27282728 } ) ;
2729+
2730+ QUnit . testInActiveWindow ( 'Popup should not close on tab press after search when applyValueMode is "useButtons" (T1230517)' , function ( assert ) {
2731+ if ( devices . real ( ) . deviceType !== 'desktop' ) {
2732+ assert . ok ( true , 'desktop specific test' ) ;
2733+ return ;
2734+ }
2735+
2736+ this . reinit ( {
2737+ focusStateEnabled : true ,
2738+ items : [ 'first' , 'second' , 'third' ] ,
2739+ opened : true ,
2740+ searchEnabled : true ,
2741+ applyValueMode : 'useButtons' ,
2742+ } ) ;
2743+
2744+ this . keyboard
2745+ . focus ( )
2746+ . type ( 's' )
2747+ . press ( 'tab' ) ;
2748+
2749+ assert . deepEqual ( this . instance . option ( 'opened' ) , true , 'popup is not closed' ) ;
2750+ } ) ;
27292751} ) ;
27302752
27312753QUnit . module ( 'keyboard navigation through tags' , {
You can’t perform that action at this time.
0 commit comments