Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 1022423 - App names disappear after switching locale
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGrandon committed Jun 11, 2014
1 parent 54c4f6d commit eef7327
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apps/verticalhome/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
onLocalized: function() {
var items = this.grid.getItems();
var titles = [];
items.forEach(function eachItem(item) {
if(!item.name) {
return;
Expand All @@ -59,6 +60,18 @@
// the app. We just need to get it and set the content.
var element = item.element.querySelector('.title');
element.textContent = item.name;

// Bug 1022866 - Workaround for projected content nodes disappearing
// We need to hide and 'flash' the the element style.
element.style.display = 'none';

titles.push(element);
});

// Bug 1022866 - Recover from workaround, display titles afer a reflow.
document.body.clientTop;
titles.forEach(function eachItem(title) {
title.style.display = '';
});
},

Expand Down

0 comments on commit eef7327

Please sign in to comment.