mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
fix for bug #383762: "Sort by Name" doesn't work properly with non-ascii characters.patch=Pavel Cvrcek <bugs@jasnapaka.com>r=sspitzer
This commit is contained in:
parent
7e12096096
commit
ccb8b9955d
@ -2222,12 +2222,7 @@ PlacesSortFolderByNameTransaction.prototype = {
|
|||||||
items.push(item);
|
items.push(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sortItems(a, b) {
|
items.sort(function (a, b) { return a.title.localeCompare(b.title); });
|
||||||
var atitle = a.title;
|
|
||||||
var btitle = b.title;
|
|
||||||
return (atitle == btitle) ? 0 : ((atitle < btitle) ? -1 : 1);
|
|
||||||
}
|
|
||||||
items.sort(sortItems);
|
|
||||||
|
|
||||||
for (var i = 0; i < count; ++i)
|
for (var i = 0; i < count; ++i)
|
||||||
this.bookmarks.setItemIndex(items[i].itemId, i);
|
this.bookmarks.setItemIndex(items[i].itemId, i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user