Skip to content

Commit

Permalink
MS Edge hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycoates committed Mar 12, 2018
1 parent b840173 commit da82ef8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/fileSender.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ export default class FileSender extends Nanobus {
this.keychain,
p => {
this.progress = p;
this.emit('progress', p);
this.emit('progress');
}
);
this.msg = 'fileSizeProgress';
this.emit('progress'); // HACK to kick MS Edge
try {
const result = await this.uploadRequest.result;
const time = Date.now() - start;
Expand Down
4 changes: 4 additions & 0 deletions app/templates/progress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ const oDiameter = oRadius * 2;
const circumference = 2 * Math.PI * radius;

module.exports = function(progressRatio, indefinite = false) {
// HACK - never indefinite for MS Edge
if (/edge/i.test(navigator.userAgent)) {
indefinite = false;
}
const p = indefinite ? 0.2 : progressRatio;
const dashOffset = (1 - p) * circumference;
const progressPercent = html`
Expand Down

0 comments on commit da82ef8

Please sign in to comment.