When using the HTML select element, the UIWebView is its own UIPopoverController as a drop-down list on the iPad (iPhone uses a UIPickerView that works great).
On iOS11, this looks completely broken:
- Clicking the drop down box to reject it without selecting an option will close the popover and immediately resubmit it, sometimes empty
- If more than one drop-down list appears on the page, the drop-down list for the new list contains elements from the previous list
- When you select the second drop-down list, it opens again first
- Sometimes in the upper left corner there is a random breakaway (presumably, a lost initial view)
- The above steps sometimes lead to the following failure:
2017-09-23 09: 43: 13.190728 + 0100 Web [1779: 86622] * Application termination due to the uncaught exception "NSInternalInconsistencyException", reason: 'UITableView dataSource not set' * First throw call stack: (0 CoreFoundation 0x000000010d4a01cb exceptionPreprocess + 171 1 libobjc.A.dylib
0x000000010c8bbf41 objc_exception_throw + 48 2 CoreFoundation
0x000000010d4a5362 + [NSException raise: format: arguments:] + 98 3
Foundation 0x000000010c360089 - [NSAssertionHandler handleFailureInMethod: object: file: lineNumber: description:] + 193 4
UIKit 0x000000010da742f5 - [UITableView _createPreparedCellForGlobalRow: withIndexPath: willDisplay:] + 1756 5 UIKit 0x000000010da7451a - [UITableView _createPreparedCellForRowAtIndexPath: +DatePreview_Item_Item_UpDate_Item_UpDate_Item_Item_Up_TimeItem_UpDateItem_Item_It
UIKit 0x000000010dd2b939 - [UISectionRowData heightForRow: inSection: canGuess:] + 259 8 UIKit 0x000000010dd31c1a - [UITableViewRowData heightForRow: inSection: canGuess: adjustForReorderedRow:] + 277 9
UIKit 0x000000010dd36230 - [UITableViewRowData obespechivaetHeightsFaultedInForScrollToIndexPath: withScrollPosition: boundsHeight:] + 964 10 UIKit 0x000000010da51110 - [UITableView _contentOffsetForScrollingToRowAtIndexPath: atScrollPosition : usingPresentationValues:] + 2783 11 UIKit 0x000000010da51b8f - [UITableView _scrollToRowAtIndexPath: atScrollPosition : animated: usingPresentationValues:] + 146 12 UIKit 0x000000010da51a11 - [UITableView scrollToRowAtIndexPath: atScrollPosition: animated:] + 123 13 UIKit 0x000000010de72d11 - [UIWebSelectTableViewController viewWillAppear:] + 247 14 UIKit 0x000000010dabe9b0 - [UIViewController _setViewAppearState: isAnimating :] + 444 15 UIKit 0x000000010dabf245 - [UIViewController __viewWillAppear:] + 147 16 UIKit 0x000000010da8b881 __56 - [UIPresentationController runTransitionForCurrentState] _block_invoke + 1088 17 UIKit
0x000000010d926c61 _runAfterCACommitDeferredBlocks + 318 18 UIKit
0x000000010d91530d _cleanUpAfterCAFlushAndRunDeferredBlocks + 280 19 UIKit 0x000000010d945600 _afterCACommitHandler + 137 20 CoreFoundation 0x000000010d442db7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 21 CoreFoundation 0x000000010d442d0e __CFRunLoopDoObservers + 430 22 CoreFoundation 0x000000010d427324 __CFRunLoopRun + 1572 23 CoreFoundation
0x000000010d426a89 CFRunLoopRunSpecific + 409 24 GraphicsServices
0x00000001124c89c6 GSEventRunModal + 62 25 UIKit
0x000000010d91ad30 UIApplicationMain + 159 26 Website 0x000000010bfb014f main + 111 27 libdyld.dylib
0x0000000110df1d81 start + 1 28 ??? 0x0000000000000001 0x0 + 1`
I created a sample application with one line of code that demonstrates the problem:
https://github.com/AshRobinson/BrokenUIWebView
http://gph.is/2xmHFWs
Does anyone have a workaround for such a problem? Switching to WKWebview is not an option for us at this stage.
Is there a way to get iPad to use UIPickerView for dropdowns according to iPhone temporarily?
I explored the suggestions in other stack overflow messages with no luck, for example:
ios 11 beta 5 select dropdown
source share