Skip to content

Instantly share code, notes, and snippets.

View premiumFrye's full-sized avatar

Nicholas Frye premiumFrye

View GitHub Profile
@premiumFrye
premiumFrye / exampl android-form-polyfill gist.markdown
Last active August 29, 2015 14:28
exampl android-form-polyfill gist
@premiumFrye
premiumFrye / pf-mobilePolyForm.js
Last active July 7, 2016 11:00
A directive for making Android behave a bit more like iOS when filling out forms using the ionic framework. Directive will automatically advance cursor to next field when user taps return, and if the next field is a select input, automatically pop open options. Additionally, this directive solves an issue where angularjs won't update ng-model an…
/*global ionic*/
// for example usage, see http://codepen.io/premiumfrye/pen/pJMOZe
angular.module('pf-mobilePolyForm', [])
.directive('mobileFormPolyfill', function ($timeout, $parse) {
// keep track of our input fields for jumping to the next
var inputs = [],
// any other methods declared in template for ng-keydown that we'll want called
keydownFns = [];