Skip to content

Commit

Permalink
[ACA-2260] Open in Office - action breaks application in IE (Alfresco…
Browse files Browse the repository at this point in the history
…#1014)

* ie office luncher workaround

* open office without location navigation

* check instance before remove
  • Loading branch information
pionnegru authored and dhrn committed Apr 30, 2019
1 parent cc0cbba commit 3b7b6c8
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions projects/adf-office-services-ext/src/lib/aos-extension.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,16 @@ export class AosEditOnlineService {
) {
const protocolUrl = protocolHandler + ':ofe%7Cu%7C' + url;

const input = document.createElement('input');
const inputTop = document.body.scrollTop + 10;
input.setAttribute(
'style',
'z-index: 1000; background-color: rgba(0, 0, 0, 0); ' +
'border: none; outline: none; position: absolute; left: 10px; top: ' +
inputTop +
'px;'
);
document.getElementsByTagName('body')[0].appendChild(input);
input.focus();
location.href = protocolUrl;
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = protocolUrl;

document.body.appendChild(iframe);

setTimeout(function() {
input.onblur = null;
input.remove();
setTimeout(() => {
if (iframe) {
document.body.removeChild(iframe);
}
}, 500);
}
}

0 comments on commit 3b7b6c8

Please sign in to comment.