File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
testing/tests/DevExpress.ui.widgets.editors Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -541,6 +541,8 @@ const Lookup = DropDownList.inherit({
541541 return 'auto' ;
542542 } ,
543543
544+ _allowSelectItemByTab : ( ) => false ,
545+
544546 _popupTabHandler ( e ) {
545547 const shouldLoopFocusInsidePopup = this . _shouldLoopFocusInsidePopup ( ) ;
546548
Original file line number Diff line number Diff line change @@ -3016,6 +3016,28 @@ QUnit.module('keyboard navigation', {
30163016 assert . ok ( instance . option ( 'opened' ) , 'popup is opened' ) ;
30173017 } ) ;
30183018
3019+ QUnit . test ( 'lookup value should not be changed after pressing tab' , function ( assert ) {
3020+ if ( devices . real ( ) . deviceType !== 'desktop' ) {
3021+ assert . ok ( true , 'test does not actual for mobile devices' ) ;
3022+ return ;
3023+ }
3024+
3025+ const $element = $ ( '#widget' ) . dxLookup ( {
3026+ opened : true ,
3027+ items : [ 1 , 2 , 3 ] ,
3028+ focusStateEnabled : true ,
3029+ searchEnabled : false ,
3030+ } ) ;
3031+ const instance = $element . dxLookup ( 'instance' ) ;
3032+ const $input = $ ( instance . field ( ) ) ;
3033+ const keyboard = keyboardMock ( $input ) ;
3034+
3035+ $input . trigger ( 'focusin' ) ;
3036+ keyboard . keyDown ( 'tab' ) ;
3037+
3038+ assert . strictEqual ( instance . option ( 'value' ) , null , 'Lookup input field has no value' ) ;
3039+ } ) ;
3040+
30193041 QUnit . testInActiveWindow ( 'lookup item should be selected after \'enter\' key pressing' , function ( assert ) {
30203042 if ( devices . real ( ) . deviceType !== 'desktop' ) {
30213043 assert . ok ( true , 'test does not actual for mobile devices' ) ;
You can’t perform that action at this time.
0 commit comments