Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10097

cordova-plugin-dialogs alert does not show on iOS when called from a select list onChange() event.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0
    • None
    • cordova-plugin-dialogs
    • None
    • Mac OS X - Yosemite, xCode 7.1,

    Description

      I have a javascript file that has a form with a select drop-down list with several items in the list. When I select an item in the list an onChange event fires that goes to a function that contains the code to display a navigation confirm alert but the alert confirm does not display. This code worked in Cordova 3.5.0 and IOS 7 but now that I have upgraded to Cordova 4.0.0 and IOS 9.1 it does not work. I am using Cordova Dialogs 1.2.0. I am also using JQuery 1.3.2. I am receiving in xCode the following alert.
      Warning: Attempt to present <UIAlertController: 0x1688f200> on <UIWebSelectTableViewController: 0x1b0bfbd0> whose view is not in the window hierarchy!

      Steps to recreate:
      1 - I have created a form with a select list as follows:
      <select id='purpose' data-mini='true' data-theme='b' onChange='checkInput();'>

      2 - function checkInput() has the following code:

      function checkInput {
      navigator.notification.confirm(
      'Is this a reimbursable expense or a tax deductible expense that you will claim on your income tax return?',
      function(buttonIndex) {
      onConfirmReimbursement(buttonIndex);
      },
      };
      

      3 - Callback function is as follows:

      function onConfirmReimbursement(buttonIndex) {
      if (buttonIndex === 1) {
      reimbursable = true;
      deductible = false;
      } else if (buttonIndex === 2) {
      reimbursable = false;
      deductible = true;
      return;
      };
      };
      'Business Expense', ['Reimbursable','Tax Deductible'] 
      );
      

      Attachments

        Activity

          People

            jcesarmobile jcesarmobile
            jazzman1024 Wilfred Sessoms
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: