Skip to content

kurtisf/cordova-plugin-fix-select-popover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-fix-select-popover

This is a simple Cordova plugin to fix crashes on iPad when a user opens a HTML select control. The UIWebView does not always correclty handle the popover on iPad under certain scenarios. It uses a swizzle to extend UIViewControler's presentViewController method.

Here are a few examples of the crashes we've found:

Fatal Exception: NSRangeException -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (4) beyond bounds (0) for section (0).

Fatal Exception: NSGenericException UIPopoverPresentationController (<UIPopoverPresentationController: 0x15d0eda0>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.

Install

You can add the plugin to your Cordova project from this repository:

cordova plugin add https://github.com/kurtisf/cordova-plugin-fix-select-popover

Setup

None! Just add the plugin and that’s it! The code is in an iOS Category which swizzle's itself in.

About

Cordova plugin to fix HTML select control crashes on iPad.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published