title: WKWebView not working even after enabling Javascript - Swift
body: <p>I'm trying to show a webView and its contents using WKWebView. I used the below code, and the webView shows its content. The thing is, there is a function to show an auto fill drop down when clicking a button/ textfield inside the webView. And which is working fine on android after enabling the javascript, But it doesn't work for me even if I enable the javascript as per the code below. (ref: <a href="https://stackoverflow.com/a/47038285/5416775">https://stackoverflow.com/a/47038285/5416775</a>)</p>
  
  <pre><code>private var webView: WKWebView!
  
     let preferences = WKPreferences()
     preferences.javaScriptEnabled = true
     let configuration = WKWebViewConfiguration()
     configuration.preferences = preferences
     webView = WKWebView(frame: view.bounds, configuration: configuration)
  </code></pre>
  
  <p>And the function which the php team uses the below code to show the drop down dynamically.</p>
  
  <pre><code>$('input[name=\'option\']').autocomplete({
   'source': function(request, response) {
     $.ajax({
   url: 'index.php?route=product/product_option/autocomplete&amp;language_id=&lt;?php echo $language_id; ?&gt;&amp;store_id=&lt;?php echo $store_id; ?&gt;&amp;filter_name=' +  encodeURIComponent(request),
   dataType: 'json',     
   success: function(json) {
     response($.map(json, function(item) {
       return {
         category: item['category'],
         label: item['name'],
         value: item['option_id'],
         type: item['type'],
         option_value: item['option_value']
           }
         }));
       }
     });
   },
   'select': function(item) {
     html  = '&lt;div class="tab-pane" id="tab-option' + option_row + '"&gt;';
      html += ' &lt;input type="hidden" name="product_option[' + option_row + '][product_option_id]" value="" /&gt;';
     html += ' &lt;input type="hidden" name="product_option[' + option_row + '][name]" value="' + item['label'] + '" /&gt;';
     html += ' &lt;input type="hidden" name="product_option[' + option_row + '][option_id]" value="' + item['value'] + '" /&gt;';
     html += ' &lt;input type="hidden" name="product_option[' + option_row + '][type]" value="' + item['type'] + '" /&gt;';
  
     if (item['type'] == 'checkbox') {
     html += ' &lt;div class="form-group"&gt;';
     html += '   &lt;label class="col-sm-12 control-label text-danger"&gt;&lt;?php echo $entry_text_required; ?&gt;&lt;/label&gt;';
     html += ' &lt;/div&gt;';
     }
  
     html += ' &lt;div class="form-group" style="display: none;"&gt;';
     html += '   &lt;label class="col-sm-2 control-label" for="input-required' + option_row + '"&gt;&lt;?php echo $entry_required; ?&gt;&lt;/label&gt;';
     html += '   &lt;div class="col-sm-10"&gt;&lt;select name="product_option[' + option_row + '][required]" id="input-required' + option_row + '" class="form-control"&gt;';
     html += '       &lt;option value="1"&gt;&lt;?php echo $text_yes; ?&gt;&lt;/option&gt;';
     html += '       &lt;option value="0"&gt;&lt;?php echo $text_no; ?&gt;&lt;/option&gt;';
     html += '   &lt;/select&gt;&lt;/div&gt;';
     html += ' &lt;/div&gt;';
  
     html += ' &lt;div class="form-group" style="display: none;"&gt;';
     html += '   &lt;label class="col-sm-2 control-label" for="input-option-sort-order' + option_row + '"&gt;&lt;?php echo $entry_option_sort_order; ?&gt;&lt;/label&gt;';
  var option_row = &lt;?php echo $option_row; ?&gt;;
  </code></pre>
  
  <p>Any solution..? would be appreciated. Thanks..! </p>