mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +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);
|
||||
}
|
||||
|
||||
function sortItems(a, b) {
|
||||
var atitle = a.title;
|
||||
var btitle = b.title;
|
||||
return (atitle == btitle) ? 0 : ((atitle < btitle) ? -1 : 1);
|
||||
}
|
||||
items.sort(sortItems);
|
||||
items.sort(function (a, b) { return a.title.localeCompare(b.title); });
|
||||
|
||||
for (var i = 0; i < count; ++i)
|
||||
this.bookmarks.setItemIndex(items[i].itemId, i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user