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 @@ -2734,6 +2734,28 @@ QUnit.module('keyboard navigation', {
27342734 assert . ok ( keyDownStub . calledOnce , 'keydown handled' ) ;
27352735 assert . ok ( keyUpStub . calledOnce , 'keyup handled' ) ;
27362736 } ) ;
2737+
2738+ QUnit . testInActiveWindow ( 'Popup should not close on tab press after search when applyValueMode is "useButtons" (T1230517)' , function ( assert ) {
2739+ if ( devices . real ( ) . deviceType !== 'desktop' ) {
2740+ assert . ok ( true , 'desktop specific test' ) ;
2741+ return ;
2742+ }
2743+
2744+ this . reinit ( {
2745+ focusStateEnabled : true ,
2746+ items : [ 'first' , 'second' , 'third' ] ,
2747+ opened : true ,
2748+ searchEnabled : true ,
2749+ applyValueMode : 'useButtons' ,
2750+ } ) ;
2751+
2752+ this . keyboard
2753+ . focus ( )
2754+ . type ( 's' )
2755+ . press ( 'tab' ) ;
2756+
2757+ assert . deepEqual ( this . instance . option ( 'opened' ) , true , 'popup is not closed' ) ;
2758+ } ) ;
27372759} ) ;
27382760
27392761QUnit . module ( 'keyboard navigation through tags' , {
You can’t perform that action at this time.
0 commit comments