From 4c16c31a2b3d6161d17ade492c0b288be308a486 Mon Sep 17 00:00:00 2001 From: Jiahao Li Date: Sat, 3 Nov 2018 19:38:03 -0400 Subject: [PATCH] Fixes the issue of being bumped out of focus while typing --- sVim.safariextension/sVimTab.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sVim.safariextension/sVimTab.js b/sVim.safariextension/sVimTab.js index 0902155..2d10a92 100644 --- a/sVim.safariextension/sVimTab.js +++ b/sVim.safariextension/sVimTab.js @@ -495,7 +495,9 @@ sVimTab.checkBlacklist = function() { }; // Init sVimTab -safari.self.tab.dispatchMessage("sendSettings"); +if (window === window.top) { + safari.self.tab.dispatchMessage("sendSettings"); +} // Catch commands from global safari.self.addEventListener("message", function(event) {