Skip to content

Commit

Permalink
Reflow popup after translation, just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed Feb 1, 2017
1 parent d83c9af commit 2d0cd30
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/popup-start.js
Expand Up @@ -72,6 +72,7 @@ const start = () => promiseTry(

return Promise.resolve()
.then(() => translate())
.then(() => reflow())
.then(() => broadcaster.registerListeningAction(knownEvents.updateProgress, (actionName, actionData) => updateProgress(actionData)))
.then(() => passClickToBackground());
}
Expand Down Expand Up @@ -144,6 +145,14 @@ const translate = () => promiseTry(
}
);

const reflow = () => promiseTry(
() => {
const bodyElement = document.getElementsByTagName("body")[0];

bodyElement.style.marginBottom = "0";
}
);

const broadcaster = background.broadcaster;
let progressBar = null;

Expand Down

0 comments on commit 2d0cd30

Please sign in to comment.