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 to best precache videos in webview/mobile browser on Android/iOS?

Description With the fast approaching removal of synchronous XMLHttpRequest (i.e.: Chrome 88 is removing this), I am looking for the next optimal alternative method to precache a video. "Sychronous XMLHttpRequest is a horrible idea" – said no one ever Yes, you’re right for most scenarios but this is different. Previously On android and ios, the […]

By kemicofa ghost
Published
Categorised as android, html, ios, javascript, webview

iOS: WKWebView does not load local JS files immediately

I’m loading two JS files into a WKWebView via loadHTMLstring method. The scripts are embedded in the application so no HTTP call is being executed. The first script is loaded in the head tag. The second is inline. This is for Lottie web player: https://github.com/LottieFiles/lottie-player. So, the first one loads lottie-player.js whereas the second one […]

By user246392
Published
Categorised as html, ios, javascript, lottie, wkwebview

How to disable iOS Chrome password/credit card autofill?

On iOS 13 Chrome, when focusing on a text input, a wide gray bar will show on top of the keyboard with only a couple buttons for password and credit card autocompletion even though the input has attributes type set to “text” and autocomplete set to “off”. Besides being unneeded, this bar doesn’t seem to […]

By Samuel
Published
Categorised as autocomplete, credit-card, google-chrome, html, ios

Get HTML content after it is loaded

I have a Share Extension in which I am getting the HTML like this: @objc func actionButtonTapped(){ var html: String? if let item = extensionContext?.inputItems.first as? NSExtensionItem, let itemProvider = item.attachments?.first, itemProvider.hasItemConformingToTypeIdentifier(“public.url”) { itemProvider.loadItem(forTypeIdentifier: “public.url”, options: nil) { (url, error) in if (url as? URL) != nil { html = (self.getHTMLfromURL(url: url as? URL)) self.doStuff(html: […]

By Chris
Published
Categorised as html, ios, javascript, swift

Scrape product price from any Website using Swift Soup

Inside my app I would like to scrape the price of any product (user types in the wanted URL). I searched quite a bit now and I found out that there are couple of Webscrapers, I think I will use SwiftSoup for now. However I couldn’t find a single tutorial that teaches how to scrape […]

By Chris
Published
Categorised as html, ios, swift, swiftsoup, web-scraping
1 2 3 5

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