cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dirkpostma <...@git.apache.org>
Subject [GitHub] cordova-plugin-dialogs issue #50: CB-8773: Fix for iOS 8 keyboard not appear...
Date Wed, 04 Jan 2017 09:27:58 GMT
Github user dirkpostma commented on the issue:

    https://github.com/apache/cordova-plugin-dialogs/pull/50
  
    For ionic users who suffer the same problem, I found a workaround by applying a 500ms
timeout. 
    It's bad UX because of the delay, but at least the keyboard is not dismissed anymore.
    
    >         function promptIOS(message, title, value) {
    >             return $timeout(function() {
    >                 return $cordovaDialogs.prompt(_.defaults(message, ""), _.defaults(title,
"Type een omschrijving"), ['Cancel', 'OK'], value)
    >                     .then(function(result) {
    >                         var input = result.input1;
    >                         // no button = 0, 'Cancel' = 1, 'OK' = 2
    >                         var buttonIndex = result.buttonIndex;
    > 
    >                         if (buttonIndex == 2) {
    >                             // OK pressed
    >                             return $q.resolve(result.input1);
    >                         } else {
    >                             // Cancel
    >                             return $q.reject("user pressed cancel");
    >                         }
    >                     });
    >                 }, 500);
    >         }


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message