Firefox pinned tab workaround, closes #356

This commit is contained in:
Mo Bitar
2020-01-31 11:47:27 -06:00
parent a9d2d519f4
commit 2418f35477
3 changed files with 30 additions and 5 deletions

View File

@@ -741,6 +741,18 @@ function (_PureCtrl) {
value: function hasAvailableExtensions() {
return this.actionsManager.extensionsInContextOfItem(this.state.note).length > 0;
}
}, {
key: "performFirefoxPinnedTabFix",
value: function performFirefoxPinnedTabFix() {
/**
* For Firefox pinned tab issue:
* When a new browser session is started, and SN is in a pinned tab,
* SN is unusable until the tab is reloaded.
*/
if (document.hidden) {
window.location.reload();
}
}
}, {
key: "saveNote",
value: function saveNote(_ref2) {
@@ -749,6 +761,7 @@ function (_PureCtrl) {
var bypassDebouncer = _ref2.bypassDebouncer,
updateClientModified = _ref2.updateClientModified,
dontUpdatePreviews = _ref2.dontUpdatePreviews;
this.performFirefoxPinnedTabFix();
var note = this.state.note;
note.dummy = false;

File diff suppressed because one or more lines are too long