xpl/crx-hotreload

Anyone having issues with the recent `currentWindow: false` change? A feedback needed.

xpl opened this issue · 4 comments

xpl commented

See this PR by @dmitry-pogorelov: #4

screen shot 2018-08-30 at 15 48 03

Some users (@acfasj) report that the parameter change does not work as expected... Unfortunately I currently do not have time to test & verify this thoroughly, so I would appreciate any feedback.

I can confirm that setting currentWindow: true works best for me and should be set back.

xpl commented

@oneezy Thanks for the feedback. I'm setting the currentWindow back to true then (until there is an overwhelming evidence that the false setting is better...). And this open issue will hang there for a while.

I've been periodically trying to debug/improve this while working on an extension. Having current window set to true or false both works and fails for me, and it's hard to debug why.

It's not perfect but as a practical suggestion, I'm find using lastFocusedWindow instead of currentWindow a better experience because it's more predictable (if it doesn't refresh, it's because I had last focused on a different Chrome window).

chrome.tabs.query({ active: true, lastFocusedWindow: true }, (tabs) => {
    if (tabs[0]) {
      chrome.tabs.reload(tabs[0].id);
    }
    chrome.runtime.reload();
  });
xpl commented

@smcllns Thank you for your response! I'll reopen the issue for now (let's see if there's more feedback coming), also will try your suggestion soon – there are going to be changes (e.g. adding file exclusion/inclusion, thanks to @mikob's work), so I'll try to find the time to wrap this all up.