mirror of
https://github.com/pulse-browser/browser.git
synced 2024-09-11 12:45:43 +03:00
parent
61c1363e79
commit
ab95266f53
@ -14,7 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix fetching new language packs (bug #287)
|
||||
- Fix fetching new language packs (bug [#287](https://github.com/pulse-browser/browser/issues/287))
|
||||
- Sidebar starts up on the correct side of the browser (bug [#277](https://github.com/pulse-browser/browser/issues/277))
|
||||
|
||||
## 1.0.0-a.82
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser-sidebar.js b/browser/base/content/browser-sidebar.js
|
||||
index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf8419d2f6 100644
|
||||
index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..b607ca233ed7219bff900a98fd1e730968ffe7a4 100644
|
||||
--- a/browser/base/content/browser-sidebar.js
|
||||
+++ b/browser/base/content/browser-sidebar.js
|
||||
@@ -11,6 +11,9 @@ var SidebarUI = {
|
||||
@ -94,7 +94,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
// lastOpenedId is set in show() but unlike currentID it's not cleared out on hide
|
||||
// and isn't persisted across windows
|
||||
lastOpenedId: null,
|
||||
@@ -111,6 +159,48 @@ var SidebarUI = {
|
||||
@@ -111,6 +159,52 @@ var SidebarUI = {
|
||||
this._switcherTarget.addEventListener("command", () => {
|
||||
this.toggleSwitcherPanel();
|
||||
});
|
||||
@ -139,11 +139,15 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
+ this._box.style.marginLeft = "unset";
|
||||
+
|
||||
+ this.loadedSidebars = [];
|
||||
+
|
||||
+ // Ensure that the sidebar's position is correct on startup. The position
|
||||
+ // will be fetched by the lazy preference getter down the bottom
|
||||
+ this.setPosition();
|
||||
+
|
||||
this._switcherTarget.addEventListener("keydown", event => {
|
||||
this.handleKeydown(event);
|
||||
});
|
||||
@@ -120,15 +210,33 @@ var SidebarUI = {
|
||||
@@ -120,15 +214,33 @@ var SidebarUI = {
|
||||
Services.obs.addObserver(this, "intl:app-locales-changed");
|
||||
|
||||
this._initDeferred.resolve();
|
||||
@ -178,7 +182,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
|
||||
if (this._box.hasAttribute("positionend")) {
|
||||
xulStore.persist(this._box, "positionend");
|
||||
@@ -160,7 +268,7 @@ var SidebarUI = {
|
||||
@@ -160,7 +272,7 @@ var SidebarUI = {
|
||||
/**
|
||||
* The handler for Services.obs.addObserver.
|
||||
**/
|
||||
@ -187,7 +191,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
switch (topic) {
|
||||
case "intl:app-locales-changed": {
|
||||
if (this.isOpen) {
|
||||
@@ -171,6 +279,54 @@ var SidebarUI = {
|
||||
@@ -171,6 +283,54 @@ var SidebarUI = {
|
||||
this.showInitially(this.lastOpenedId);
|
||||
break;
|
||||
}
|
||||
@ -242,7 +246,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -290,17 +446,31 @@ var SidebarUI = {
|
||||
@@ -290,17 +450,31 @@ var SidebarUI = {
|
||||
// First reset all ordinals to match DOM ordering.
|
||||
let browser = document.getElementById("browser");
|
||||
[...browser.children].forEach((node, i) => {
|
||||
@ -279,7 +283,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
// Indicate we've switched ordering to the box
|
||||
this._box.setAttribute("positionend", true);
|
||||
} else {
|
||||
@@ -489,6 +659,10 @@ var SidebarUI = {
|
||||
@@ -489,6 +663,10 @@ var SidebarUI = {
|
||||
},
|
||||
|
||||
_loadSidebarExtension(commandID) {
|
||||
@ -290,7 +294,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
let sidebar = this.sidebars.get(commandID);
|
||||
let { extensionId } = sidebar;
|
||||
if (extensionId) {
|
||||
@@ -527,6 +701,7 @@ var SidebarUI = {
|
||||
@@ -527,6 +705,7 @@ var SidebarUI = {
|
||||
}
|
||||
|
||||
this._fireFocusedEvent();
|
||||
@ -298,7 +302,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
return true;
|
||||
});
|
||||
},
|
||||
@@ -550,6 +725,7 @@ var SidebarUI = {
|
||||
@@ -550,6 +729,7 @@ var SidebarUI = {
|
||||
}
|
||||
return this._show(commandID).then(() => {
|
||||
this._loadSidebarExtension(commandID);
|
||||
@ -306,7 +310,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
return true;
|
||||
});
|
||||
},
|
||||
@@ -563,6 +739,38 @@ var SidebarUI = {
|
||||
@@ -563,6 +743,38 @@ var SidebarUI = {
|
||||
*/
|
||||
_show(commandID) {
|
||||
return new Promise(resolve => {
|
||||
@ -345,7 +349,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
this.selectMenuItem(commandID);
|
||||
|
||||
this._box.hidden = this._splitter.hidden = false;
|
||||
@@ -580,7 +788,13 @@ var SidebarUI = {
|
||||
@@ -580,7 +792,13 @@ var SidebarUI = {
|
||||
this.observeTitleChanges(sourceL10nEl);
|
||||
this.browser.setAttribute("src", url); // kick off async load
|
||||
|
||||
@ -360,7 +364,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
this.browser.addEventListener(
|
||||
"load",
|
||||
event => {
|
||||
@@ -624,11 +838,14 @@ var SidebarUI = {
|
||||
@@ -624,11 +842,14 @@ var SidebarUI = {
|
||||
// create a new content viewer because the old one doesn't get destroyed
|
||||
// until about:blank has loaded (which does not happen as long as the
|
||||
// element is hidden).
|
||||
@ -377,7 +381,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
|
||||
let selBrowser = gBrowser.selectedBrowser;
|
||||
selBrowser.focus();
|
||||
@@ -642,10 +859,27 @@ var SidebarUI = {
|
||||
@@ -642,10 +863,27 @@ var SidebarUI = {
|
||||
* none if the argument is an empty string.
|
||||
*/
|
||||
selectMenuItem(commandID) {
|
||||
@ -406,7 +410,7 @@ index f5def93f56fc8d02d6ae6834ca8d2df0aead2379..976768180f96c3ae1abec661410d42bf
|
||||
if (id == commandID) {
|
||||
menu.setAttribute("checked", "true");
|
||||
if (triggerbutton) {
|
||||
@@ -661,6 +895,107 @@ var SidebarUI = {
|
||||
@@ -661,6 +899,107 @@ var SidebarUI = {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user