зеркало из https://github.com/mozilla/gecko-dev.git
instead, per Asaf's advice, fix this with setTimeout() so that we fix all views at once. again, these bugs are fall out from bug #267833: Fire XBL constructors from EndUpdate(), not before. r=mano
This commit is contained in:
Родитель
a7eab29428
Коммит
b8cef2d114
|
@ -36,12 +36,6 @@
|
|||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
function init() {
|
||||
// XXX workaround for bug #373719 caused by the fix for bug #267833
|
||||
// move setting the "place" attribute from the tree in bookmarksPanel.xul
|
||||
// to here, onload. we plan on reverting this, see bug #373944
|
||||
var tree = document.getElementById('bookmarks-view');
|
||||
tree.place = "place:&folder=1&group=3&excludeQueries=1";
|
||||
|
||||
document.getElementById('search-box').focus();
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
<tree id="bookmarks-view" class="placesTree" type="places"
|
||||
flex="1"
|
||||
hidecolumnpicker="true"
|
||||
place="place:&folder=1&group=3&excludeQueries=1"
|
||||
context="placesContext"
|
||||
onkeypress="if (event.keyCode == 13) this.controller.openSelectedNodeWithEvent(event);"
|
||||
onclick="SidebarUtils.handleClick(this, event);">
|
||||
|
|
|
@ -54,14 +54,14 @@ var PlacesOrganizer = {
|
|||
_content: null,
|
||||
|
||||
init: function PO_init() {
|
||||
var self = this;
|
||||
// on timteout because of the corresponding setTimeout()
|
||||
// in the places tree binding's constructor
|
||||
setTimeout(function() { self._init(); }, 0);
|
||||
},
|
||||
|
||||
_init: function PO__init() {
|
||||
this._places = document.getElementById("placesList");
|
||||
|
||||
// XXX workaround for bug #373721 caused by the fix for bug #267833
|
||||
// move setting the "place" attribute from the tree in places.xul
|
||||
// to here, onload. we plan on reverting this, see bug #373944
|
||||
this._places.place =
|
||||
"place:&folder=1&group=3&excludeItems=1&excludeQueries=1";
|
||||
|
||||
this._content = document.getElementById("placeContent");
|
||||
|
||||
OptionsFilter.init(Groupers);
|
||||
|
@ -71,6 +71,7 @@ var PlacesOrganizer = {
|
|||
var placeURI = "place:";
|
||||
if ("arguments" in window)
|
||||
placeURI = window.arguments[0];
|
||||
|
||||
selectPlaceURI(placeURI);
|
||||
|
||||
var view = this._content.treeBoxObject.view;
|
||||
|
|
|
@ -338,6 +338,7 @@
|
|||
<tree id="placesList"
|
||||
class="placesTree"
|
||||
type="places"
|
||||
place="place:&folder=1&group=3&excludeItems=1&excludeQueries=1"
|
||||
hidecolumnpicker="true" context="placesContext"
|
||||
onselect="PlacesOrganizer.onPlaceSelected(true);
|
||||
PlacesOrganizer.updateStatusBarForView(this);"
|
||||
|
|
|
@ -53,7 +53,11 @@
|
|||
this.controllers.appendController(this._controller);
|
||||
|
||||
// Force an initial build.
|
||||
this.place = this.place;
|
||||
// but do it on setTimeout() for bugs #373719 and bug #373721
|
||||
// caused by a change for bug #267833
|
||||
// note the corresponding setTimeout() in PO_init()
|
||||
var self = this;
|
||||
setTimeout(function() { self.place = self.place; }, 0);
|
||||
]]></constructor>
|
||||
|
||||
<destructor><![CDATA[
|
||||
|
|
Загрузка…
Ссылка в новой задаче