iOS9: Select fields in UIWebView breaking app - ios

We are testing how our app, which contains an UIWebView, copes with the new Split View functionality for iPads. And doing so we have run into trouble with select fields.
When the user taps a select field, a popover with the available options appears. However, when the app is resized (by pulling the divider of the split view to the left or right), we see a blank screen or a select list that takes up all of the available space and which cannot be dismissed.
Any ideas?

It seems like the best solution for now would be to dismiss the popover as soon as the resize event is fired. Hopefully, Safari will soon be updated to dismiss popovers automatically, when web views are resized.
In the meantime, you can hook up a resize handler to the window:
window.addEventListener("resize", resizeHandler);
function resizeHandler() {
safari.self.hide();
}
This appears to be a bug in the popover in Safari. When I go through similar steps, the layout of the web page changes to fit the new dimensions. However, the popover is not re-positioned with the select field. The result is that it is detached from the field that presented it.
Following these steps, I was able reproduce your issue, but to a lesser extent than what you described:
With the split bar to the right of the iPad, tap on the select box.
Move the split bar to the center of the iPad.
The popover is no longer attached the to the select field.
Here's a screen shot of the detached popover:
Here's the original select field position:

The problem still exists with iOS 9.2.1 and iOS 9.3 beta 2.
You can reproduce it with every third-party browser.
An HTML Select input on iPad is not working in Slide Over or Split View 1/3 width.
https://forums.developer.apple.com/thread/23300
Currently there is no workaround possible,
expect not to use HTML select.
I have descriped details on the following side.
https://medium.com/#chemm/select-inputs-on-ipad-breaking-third-party-browsers-in-slide-over-or-split-view-1-3-952b796d70ad#.shytp1ywi

Related

When navigating to a page from "More" on iOS the toolbar does not show until device orientation is changed

I use tabbed page and have way more than 5 items in my TabbedPage (15 of them). Now when each ContentPage I navigate to is in within first 4 items, my toolbar renders correctly, displaying the icon and allowing user to interact. The problem begins when I have to go to "... More" tab.
Once I select one of the ContentPages there I don't see the same Toolbar with ToolbarItems in it. Rotating the device to Landscape and back brings the ToolbarItems back.
I have scoured the internet looking for an answer but I can't find much about this particular issue.
Could y'all smart folks point me to a solution to my problem?
I made a simple test but did not reproduce your issue .
What is the version of Xamarin.Forms ? And What specific device did you test on ?

IOS native keyboard pushing entire webview up - cordova app

I am developing an app (IOS platform) using HTML5, CSS3, angular and cordova(3.8) and stuck with an major issue.
I have a page with footer having three buttons. On click of each button a modal comes up from the bottom. Modal position is set to fixed and inside it as scroll-able container. scroll-able container contains a text area where user can input some text.
Whenever the modal comes up, text area is focused so that keyboard comes up by default. The issue is whenever native keyboard comes up webview is pushed up and entire modal gets scrolled.
I saw same issues been posted by others and I tried few solutions mentioned in reply for those questions like using ionic keyboard plugin, setting scrollTop to 0 on textarea focus. But nothing worked out.
In config.xml, I have set DisallowOverscroll to true.
It would be great helpful if someone help me with this issue ?

HTML5: iOS screen scrolls up when keyboard shows up

Say you've got a Xcode app with embedded web view exposing a simple HTML5 page.
This page has a title and an input tag and a nav top bar (position: fixed; top:0;).
When the user tap in it the first time, the whole screen scrolls up to enable the keyboard appears while maintaining the input tag visible, when I tap the enter button.
The issue I face is that my HTML is not restored identically (I mean, it scrolls down back, but my top bar is shifted about 10 pixels below the top edge of the screen.
But when I tap the keyboard hide button, the scrolls restore my initial view, with no issue.
Anyone experienced the issue before? Any clue of what going on or a way to work around this?
Ps: issue is present on iOS 7 (7.1.2). I didn't tested on iOS 8 as my app must support iOS 7.
I finally ended up with adding an explicit keyboard withdrawing by applying blur() the the input as follows:
<input ng-change="$(this).blur()">
This immediately makes the keyboard disappearing, while the hw initial scrolling is reversed.

Has anyone experienced one form element activating another on iOS / iPhone?

I have a form that appears in a FancyBox iframe modal. On iOS 5 (specifically on an iPhone - does not occur on iPad) when I touch the submit button it activates a <select> that appears about 50 pixels above the submit button and I'm then presented with the <select> options at the bottom of the screen.
I've zoomed in as much as possible to verify that I'm not touching the select – I am indeed clicking on the submit button and it highlights itself as expected, but the form of course does not submit and I get the options to pick from.
Has anyone experienced a bug like this in iOS 5? I can't pin this down to anything else – there is some javascript that would normally run to process the form on submit click but it's not being activated at all and it has no effect on the form itself, the <select>, etc. I have seen several odd things with iframes on iOS and wonder if there is a potential correlation.
You might have the connections for your actions going to different buttons than the outlets. That would explain why the right thing would happen (Action is OK) but updating the Frame Rect would get messed up (Outlet is on the wrong button).
iframes on ios don't behave like normal iframes in every other browser (including desktop safari).
ios safari renders them at the full height of the page inside the iframe.
To get them to scroll like a normal iframe of fixed height you have to put them in a div and set the divs overflow to auto or scroll. I'm guessing your modal overlay is already doing that.
But even a plain in-page iframe with no special positioning (other than using a parent div to crop its height and make it scrollable) will often only have the submit button work 1 time if the submit buttons original rendered location was below the fold of the parent div.
So the first submission will work, but if the form comes back with missing required field errors you can't hit the submit button again.
Further research on my old ipad shows that if the submit button is down far enough it won't even work that first time.
The bug is present in safari for ios 5.1.1 and also ios 8 !!!
I can use an onclick javascript function on any element in the iframe that is not an input type=submit to force the form to form.submit().
But specifically about the iphone issue what was probably happening was that the OS was trying to zoom in to the form field so the use could clearly see what they were typing. The fix for that might be to declare a font-size of at least 16px on input elements. That way the OS knows the text in the field is already at a fairly readable size and won't try to zoom in. Zooming in to the contents of an iframe within an absolutely positioned modal overlay is super buggy even in ios 8.

iPhone/iPad UI: seeking drop-down control

My universal app has a settings page, wherein the user must choose a theme from a dozen available themes.
Problem is, if I am using a picker-view, it takes up most of the screen on an iPhone.
I think what I want is something like your standard Windows drop-down menu, where it just displays on a single line the current selection, and clicking it expands into a scrollable list of possible items. Selecting an item collapses the list back into the original form.
So my question is: What is my best method for handling this situation? Can anyone point me to pictures or code examples of how this situation is handled successfully?
EDIT:
This is the behaviour I'm looking for:
only the currently selected profile is displayed
when the user taps on this, it expands into a list
when the user selects an item (or taps outside of the view) it collapses back to its original form, now displaying the new selection
ie functionally equivalent to a dropdown.
Firstly, this question is a duplicate of:
(not much good) Picker view as subview
(same) How to make an iPhone dropdown-looking button
(better) How to create drop down list box for an iphone app
(even better) Creating a drop-down list in iPhone app
(that last one links to some handy code)
Secondly, Google image search for 'dropdown control iphone' restricting the image size to 320x480 shows how everyone is doing this.
Basically a picker view scrolls in from the bottom, the same way as the keyboard does.

Resources