Skip to content

Commit 8f33c7e

Browse files
committed
(kb) only activate kb nav when actually using the keyboard
Just trying to disable the mouse-specific stuff to see if tests pass or not right now.
1 parent dd5b990 commit 8f33c7e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/client/components/RegionFocusSwitcher.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ export class RegionFocusSwitcher extends Disposable {
9494
this._app.on('clipboard_focus', focusActiveSection);
9595
this.onDispose(() => this._app.off('clipboard_focus', focusActiveSection));
9696

97-
if (this._gristDocObs) {
97+
/*if (this._gristDocObs) {
9898
const onClick = this._onClick.bind(this);
9999
pageContainer.addEventListener('mouseup', onClick);
100100
this.onDispose(() => pageContainer.removeEventListener('mouseup', onClick));
101-
}
101+
}*/
102102

103103
this._initiated.set(true);
104104
}
@@ -216,7 +216,7 @@ export class RegionFocusSwitcher extends Disposable {
216216
* - if necessary, make it easier to tab through things inside panels by "unfocusing" the view section,
217217
* - make sure the internal current region info is set when user clicks on the view layout.
218218
*/
219-
private _onClick(event: MouseEvent) {
219+
/*private _onClick(event: MouseEvent) {
220220
const gristDoc = this._getGristDoc();
221221
if (!gristDoc) {
222222
return;
@@ -259,7 +259,7 @@ export class RegionFocusSwitcher extends Disposable {
259259
if (!targetsMain && getPanelElement(targetRegionId as Panel) === event.target) {
260260
focusPanel();
261261
}
262-
}
262+
}*/
263263

264264
private _onEscapeKeypress() {
265265
const {region: current, initiator} = this._state.get();

test/nbrowser/RegionFocusSwitcher.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ describe("RegionFocusSwitcher", function () {
253253
assert.isTrue(await isClipboardFocused());
254254
});
255255

256-
it("should focus a panel-region when clicking an input child element", async function() {
256+
it.skip("should focus a panel-region when clicking an input child element", async function() {
257257
const session = await gu.session().teamSite.login();
258258
await session.tempNewDoc(cleanup);
259259

@@ -268,7 +268,7 @@ describe("RegionFocusSwitcher", function () {
268268
assert.isTrue(await isClipboardFocused());
269269
});
270270

271-
it("should focus a section-region when clicking on it", async function() {
271+
it.skip("should focus a section-region when clicking on it", async function() {
272272
const session = await gu.session().teamSite.login();
273273
await session.tempNewDoc(cleanup);
274274

0 commit comments

Comments
 (0)