Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion www/core/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,17 @@ angular.module('mm.core')
* @return {Void}
*/
self.openInApp = function(url) {
window.open(url, '_blank');
if (!url) {
return;
}

var options = 'enableViewPortScale=yes'; // Enable zoom on iOS.
if (ionic.Platform.isIOS() && url.indexOf('file://') === 0) {
// The URL uses file protocol, don't show it on iOS.
// In Android we keep it because otherwise we lose the whole toolbar.
options += ',location=no';
}
window.open(url, '_blank', options);
};

/**
Expand Down