title: iPad is not writing text in the <input>
body: <p>I'm having trouble with the <code>&lt;input&gt;</code> field when running my application on iPad. </p>
  
  <p>On the desktop you click on the text box, type the text in and click on a button to validate the input. On iPad however it opens the keyboard panel when you click on it, but the text doesn't show in the text box when you type.<br>
  To make things even weirder, I have a <code>&lt;textarea&gt;</code> in another section of the application and it works perfectly. The difference is one is sitting on top of the application and the other is in an imported html.</p>
  
  <p>The structure of the application is like this: </p>
  
  <p><img src="https://i.stack.imgur.com/AGqxu.png" alt="application structure">
  <br><br>
  On the top I have the main HTML5 page, which imports a html page that contains 3 divs. Each div in turn imports other html pages. And those pages have a different content each, including the problematic input field.
  Something like this:</p>
  
  <pre><code>Main.html
      -&gt; container.html (imported via iframe)
          -&gt; div1 (imports page n-1 via load(url))
          -&gt; div2 (imports page n via load(url))
          -&gt; div3 (imports page n+1 via load(url))
  
  pageN.html
      -&gt; contains the &lt;input&gt; field
  </code></pre>
  
  <p>The code for the <code>&lt;textarea&gt;</code> sitting on the main html is like this:</p>
  
  <pre><code>&lt;form id="formNotes"&gt;
      &lt;textarea id="mainTextbox" type="text" onKeyUp="RefreshNote()" onChange="RefreshNote()"&gt;&lt;/textarea&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And the code for the <code>&lt;input&gt;</code> field inside the imported html page is like this:</p>
  
  <pre><code>input{
      -webkit-user-select: auto;
  }
  
  &lt;form id="formInput"&gt;
      &lt;input id="text1" type="text" ontouchstart="OpenKeyboard(this)" onKeyDown="WriteText(this)" onKeyUp="WriteText(this)" onChange="WriteText(this)"&gt;&lt;/input&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>One thing I've learned about using events on imported HTMLs though was you need to use ontouchstart and others to call the click functions. But in this case I can get the iPad to open the keyboard, so I don't know why it's not recognizing the click on the keyboard keys, or why it's not sending the value into the text box.</p>
  
  <p>[EDIT:] I found out the reason why I'm not getting any text written is because the iPad thinks the <code>&lt;input&gt;</code> field doesn't exist (it shows up blank in the alert, instead of <code>[object Object]</code> or <code>[object HTMLInputElement]</code>). I have no idea why though.</p>
  
  <p>[EDIT 2:] I tried to use <code>getElementsByTagName</code> and <code>getElementsByClassName</code> instead of <code>getElementById</code>. With that it seems to recognize the <code>&lt;input&gt;</code>, but I still can't reach the value.</p>