You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: keyboard handler should only stop propagation on keys we intend to handle, not ALL keys, that way we don't have to call continue then call stop else where but only *sometimes* depending on the order
// TODO: Always?? or only if we're inside a grid? in which case maybe I should do this in all of Grid hooks by checking if target instance of HTMLInputElement?
expect(inputs[0]).toHaveFocus();// TODO: this should be the second input if we were on it previously, but it's always the first input right now
2758
2753
});
2759
2754
2760
2755
describe('pointer interactions',()=>{
@@ -2815,7 +2810,7 @@ describe('Table', () => {
2815
2810
awaituser.click(inputs[0]);
2816
2811
expect(inputs[0]).toHaveFocus();
2817
2812
awaituser.keyboard('{ArrowRight}');
2818
-
expect(inputs[0]).toHaveFocus();
2813
+
expect(inputs[1]).toHaveFocus();
2819
2814
awaituser.keyboard('{ArrowLeft}');
2820
2815
expect(inputs[0]).toHaveFocus();
2821
2816
// Type a string that would trigger a typeahead or selection if we weren't in a textfield
@@ -2827,7 +2822,7 @@ describe('Table', () => {
2827
2822
awaituser.click(inputs[1]);
2828
2823
expect(inputs[1]).toHaveFocus();
2829
2824
awaituser.keyboard('{ArrowRight}');
2830
-
expect(inputs[1]).toHaveFocus();
2825
+
expect(tableTester.rows[0]).toHaveFocus();
2831
2826
awaituser.keyboard('{ArrowLeft}');
2832
2827
expect(inputs[1]).toHaveFocus();
2833
2828
// Type a string that would trigger a typeahead or selection if we weren't in a textfield
@@ -2888,16 +2883,15 @@ describe('Table', () => {
2888
2883
awaituser.keyboard('{ArrowRight}');
2889
2884
expect(inputs[1]).toHaveFocus();
2890
2885
awaituser.keyboard('{ArrowRight}');
2891
-
expect(inputs[1]).toHaveFocus();
2886
+
expect(tableTester.rows[0]).toHaveFocus();
2892
2887
awaituser.keyboard('{ArrowLeft}');
2893
2888
expect(inputs[1]).toHaveFocus();
2894
2889
// Type a string that would trigger a typeahead or selection if we weren't in a textfield
2895
2890
awaituser.keyboard('B ');
2896
2891
expect(tableTester.selectedRows).toHaveLength(0);
2897
2892
expect(inputs[1]).toHaveFocus();
2898
2893
2899
-
awaituser.tab({shift: true});
2900
-
2894
+
// TODO: correct behaviour? selection cursor is where it would be if you pressed down, so it doesn't do anything, so should it be allowed to navigate cells now?
0 commit comments