Skip to content

Commit a792358

Browse files
committed
Add test for altRedirectFocus option
1 parent a5537b4 commit a792358

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/jquery-ui-timepicker-addon_spec.js

+11
Original file line numberDiff line numberDiff line change
@@ -684,5 +684,16 @@ describe('datetimepicker', function() {
684684
$altField.trigger('focus');
685685
expect(inputFocusSpy).toHaveBeenCalled();
686686
});
687+
688+
it('should not redirect focus to main field if altRedirectFocus is false', function() {
689+
$input.datetimepicker({
690+
showOn: 'button',
691+
altField: $altField,
692+
altRedirectFocus: false,
693+
});
694+
695+
$altField.trigger('focus');
696+
expect(inputFocusSpy).not.toHaveBeenCalled();
697+
});
687698
});
688699
});

0 commit comments

Comments
 (0)