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({
49
49
50
50
return extend ( { } , parent , {
51
51
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 ) {
53
55
this . _resetCaretPosition ( true ) ;
54
56
}
55
57
56
58
parent . tab && parent . tab . apply ( this , arguments ) ;
57
59
58
- this . _cancelSearchIfNeed ( ) ;
60
+ if ( ! popupHasFocusableElements ) {
61
+ this . _cancelSearchIfNeed ( ) ;
62
+ }
59
63
} ,
60
64
upArrow ( e ) {
61
65
if ( parent . upArrow . apply ( this , arguments ) ) {
Original file line number Diff line number Diff line change @@ -2734,6 +2734,28 @@ QUnit.module('keyboard navigation', {
2734
2734
assert . ok ( keyDownStub . calledOnce , 'keydown handled' ) ;
2735
2735
assert . ok ( keyUpStub . calledOnce , 'keyup handled' ) ;
2736
2736
} ) ;
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
+ } ) ;
2737
2759
} ) ;
2738
2760
2739
2761
QUnit . module ( 'keyboard navigation through tags' , {
You can’t perform that action at this time.
0 commit comments