Setting iOS UIWebView Properties

4 posts, 0 answers
  1. Matt
    Matt avatar
    9 posts
    Member since:
    Oct 2012

    Posted 02 Mar 2013 Link to this post

    Is there any way to set custom UIWebView properties for our iOS apps? I would really like to set keyboardDisplayRequiresUserAction to false, so I can pop up the soft keyboard programatically. By default, keyboardDisplayRequiresUserAction is true, so the keyboard will only display if focus() is called by a user-generated event, and doesn't work if it's in a different callstack (ie. inside a setTimeout() or ajax event handler)

    For reference: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instp/UIWebView/keyboardDisplayRequiresUserAction
  2. Matt
    Matt avatar
    9 posts
    Member since:
    Oct 2012

    Posted 02 Mar 2013 Link to this post

    Here's a short snippet to show what I'm working with, and why I'd like to be able to set the UIWebView property:

    <div id="hiddendiv">Some hidden content here</div>
    <input type="text" id="inputfield" value=""  />
    <input type="button" value="iOS keyboard won't display" onclick="button1()"/>
    <input type="button" value="iOS keyboard will display" onclick="button2()"/>

    <script type="text/javascript">
    $('#hiddendiv').fadeOut();

    function focusField() {
        $('#inputfield').focus();
    }

    // Focus when fadeIn completes (new call stack)
    function button1() {
        $('#hiddendiv').fadeIn(1000, function () {
            focusField();
        });
    }
    // Focus before fadeIn
    function button2() {
        focusField();
        $('#hiddendiv').fadeIn(1000, function () {});
    }
    </script>
  3. Evgeni "Zammy" Petrov
    Admin
    Evgeni "Zammy" Petrov avatar
    168 posts

    Posted 06 Mar 2013 Link to this post

    Hi Matt,

    This is part of config.xml (Cordova >= 2.3) or Cordova.plist (Cordova <=2.2). We have not currently made a way to modify this file but it is in our plans.

    You can head to our feedback portal and request a feature. We prioritize based on our feedback portal.

    Greetings,
    Evgeni "Zammy" Petrov
    the Telerik team

    Share feedback and vote for features on our Feedback Portal.
    Want some Kendo UI online training - head over to Pluralsight.
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Jul 2013 Link to this post

    Hello Matt,

    You'll be glad to know that in Icenium 1.6 we've given you full control by adding the ability to make configuration changes to your app by modifying the Info.plist and config.xml for iOS (and AndroidManifest.xml and config.xml for Android respectively) directly in the Icenium code editor. For more information, see Edit Configuration Files.

    For the full list of shiny goodies that made it in the 1.6 release, please refer to the Icenium 1.6 Release Notes.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
Back to Top