jquery - No scroll on angular element in iPhone 5s -
i embedding website dom element using angularjs, jquery, html5.see code below:
digibin_app.directive("displayfile", function () { var updateelem = function (element) { return function (displayfile) { element.empty(); var objectelem = {} if (displayfile && displayfile.type !== "") { if (displayfile.type === "pdf") { objectelem = angular.element(document.createelement("object")); objectelem.attr("data", displayfile.fileurl); objectelem.attr("type", "application/pdf"); } else if (displayfile.type === "html" ) { objectelem = angular.element(document.createelement("object")); var childheight = parseint(window.innerheight); // problem here in below line objectelem.attr("style", "width:100%;height:"+childheight+"px;margin:0px;"); objectelem.attr("data", displayfile.fileurl); objectelem.attr("type", "text/html"); } else { objectelem = angular.element(document.createelement("img")); objectelem.attr("src", displayfile.fileurl); } } element.append(objectelem); }; }; return { restrict: "ea", scope: { displayfile: "=" }, link: function (scope, element, attrs) { scope.$watch("displayfile", updateelem(element)); } }; });
everything coming fine data,page rendering, there functionalities etc. thing bothering me long pages not displaying scrollbars on iphone 5s. on android working absolutely fine.
what tried:
- i tried attaching touch event element
- added css -webkit-overflow-scrolling: touch body, elements parent container , element too.
kindly me out. highly appreciated.
Comments
Post a Comment