Questions tagged html

Explore the latest questions and answers asked by our top developers.

Why is iframe blank only with iOS?

There is an html page that works correctly on any Windows and Android (shows content of iframe). Hosting by Github Pages. It works on iOS version 12.5.1, but no on 14.6 (blank page on Chrome, Safari, Opera). Why? Tried src with wikipedia – ok everything. The problem narrows down to a combination of iframe and […]

By Viewed
Published
Categorised as google-apps-script, html, iframe, ios, ios14 Tagged , , , ,

iOS Safari Ignores Body Overflow: Hidden when Input Focused

It appears that on iOS 14.5 in Safari (haven’t tested in Chrome), overflow: hidden is ignored if the user is focused in an input field. Now, you can add a touch-action: none to the body element and that works in some situations, but it’s a hack (it doesn’t actually disable scrolling) and that attribute is […]

By Colin
Published
Categorised as css, html, ios, javascript, mobile-safari Tagged , , , ,

HTML number input issues with decimal seperator

I’ve some issues with decimal input on iOS using the numeric keypad. I have the following HTML: $(‘#number’).keyup(function() { $(‘#log’).prepend(‘<p>Input: ‘ + $(this).val() + ‘</p>’); }); <script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script> <input type=”number” inputmode=”decimal” id=”number”> <p> Input as number: <div id=”log”></div> </p> This is working as expected in Chrome browser, Android etc., but on iOS there is some […]

By dhrm
Published
Categorised as html, ios, javascript, jquery Tagged , , ,

Load html text in WKWebView

I use this code to load my html file with text in WKWebView: do { guard let filePath = Bundle.main.path(forResource: "(readBookNumber)", ofType: "html") else { print ("File reading error") return } var content = try String(contentsOfFile: filePath, encoding: .utf8) let baseUrl = URL(fileURLWithPath: filePath) content.changeHtmlStyle(font: "Iowan-Old-Style", fontSize: UserDefaults.standard.integer(forKey: "textSize"), fontColor: textColor) webView.loadHTMLString(headerString+content, baseURL: baseUrl) } […]

By User
Published
Categorised as html, ios, swift, wkwebview, wkwebviewconfiguration Tagged , , , ,

iOS: inserting iFrame with SRC inside the page immediately opens the url in Safari

I have quite a strange problem. This is happening inside a Cordova (hybrid HTML) app, but only on iOS. I have my HTML page with some content already there, and that’s ok. In a second moment, I’m retrieving some HTML from a remote page and I insert this HTML inside my main HTML page. If […]

By Luca Corsini
Published
Categorised as cordova, html, iframe, ios, javascript Tagged , , , ,

How do you implement a custom renderer for webview (which is displaying raw html elements on the page) in Xamarin.Forms.iOS?

I am using WebView in Xamarin.Forms to display html. It’s not displaying entire html pages– just the content which would normally be in the "body" section of an html page (i.e. <h1>Hello</h1>). However, when the webview is displayed on the page, the displayed html is far too small. Also, there is an issue where the […]

By Blake Bell
Published
Categorised as Uncategorised Tagged , , , ,

NSAttributedString loading html with images

I’m trying to render html-document with NSAttributedString in iOS 7 (as a part of investigation of the alternatives to UIWebView). Here the code: NSData *htmlData = [NSData dataWithContentsOfFile:self.chapterPath]; NSAttributedString *attrString = [[NSAttributedString alloc] initWithData:htmlData options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding)} documentAttributes:nil error:nil]; self.readerTextView.attributedText = attrString; self.readerTextView.editable = NO; And images were not displayed. Is it possible to […]

By skyylex
Published
Categorised as html, ios7, nsattributedstring, uitextview Tagged , , ,

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq