Fix scroling in iframe in Chrome App

This commit is contained in:
Tankred Hase 2014-05-09 16:01:44 +02:00
parent a7efdf1125
commit 747d9fce39
2 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -336,7 +336,10 @@ define(function(require) {
scope.html = undefined;
if (value) {
$timeout(function() {
scope.html = $sce.trustAsHtml(value);
// wrap in html doc with scrollable html tag, since chrome apps does not scroll by default
var prefix = '<!DOCTYPE html><html style="overflow-y: auto"><head></head><body>';
var suffix = '</body></html>';
scope.html = $sce.trustAsHtml(prefix + value + suffix);
});
}
});
@ -353,4 +356,4 @@ define(function(require) {
});
return ReadCtrl;
});
});