Skip to content

Instantly share code, notes, and snippets.

@tablacus
Last active June 20, 2021 01:08
Show Gist options
  • Save tablacus/1cf14bbf97c9744bfc58865127a7a744 to your computer and use it in GitHub Desktop.
Save tablacus/1cf14bbf97c9744bfc58865127a7a744 to your computer and use it in GitHub Desktop.
Focus Tree view from Inner Address bar - Tablacus Explorer
window.addEventListener("keydown", function (ev) {
if (ev.keyCode == VK_TAB) {
const res = /inneraddressbar_(\d+)/i.exec((ev.target || ev.srcElement).id);
if (res) {
setTimeout(async function () {
const FV = te.Ctrl(CTRL_TC, res[1]).Selected;
FV.Focus();
FV.TreeView.Focus();
}, 99);
if (ev.preventDefault) {
ev.preventDefault();
} else {
ev.returnValue = false;
}
return false;
}
}
});
@tablacus
Copy link
Author

tablacus commented Jun 20, 2021

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment