Fix for safari/ios not being able to access filereader

This commit is contained in:
Dan Seripap 2016-02-25 23:39:04 -05:00
parent 0d9b41bb3a
commit e94b7e192e
3 changed files with 16 additions and 5 deletions

View File

@ -128,9 +128,6 @@ export default class FileHandler {
listen() {
// browser API
document.getElementById('fileInput').addEventListener('change', this.confirmTransfer.bind(this), false);
// darkwire
return this;
}

View File

@ -33,7 +33,7 @@ export default class WindowHandler {
if (this.fileHandler.isSupported) {
$('#send-file').click((e) => {
e.preventDefault();
$('#fileInput').trigger('click');
document.getElementById('fileInput').click();
});
} else {
$('#send-file').remove();
@ -51,6 +51,7 @@ export default class WindowHandler {
window.onblur = () => {
this._isActive = false;
};
}
}

View File

@ -47,6 +47,10 @@ html, body {
padding: 0;
}
img {
max-width: 100%;
}
@font-face {
font-family: 'SourceCodePro-Regular';
src: url('fonts/SourceCodePro-Regular.eot?#iefix') format('embedded-opentype'), url('fonts/SourceCodePro-Regular.woff') format('woff'), url('fonts/SourceCodePro-Regular.ttf') format('truetype'), url('fonts/SourceCodePro-Regular.svg#SourceCodePro-Regular') format('svg');
@ -308,7 +312,16 @@ html.no-touchevents .chat #input-icons {
}
#fileInput {
display: none;
position: absolute;
top: 0;
right: 45px;
margin: 0;
opacity: 0;
-ms-filter: 'alpha(opacity=0)';
font-size: 200px;
direction: ltr;
cursor: pointer;
width: 45px;
}
.file-disclaimer {