title: Google Spreadsheet in an iframe opens in htmlview mode instead edit mode in smaller screens?
body: <p>I have a Google spreadsheet file where the users needs to edit using the tablet. Since the ipad/tablet chrome doesn't support image buttons with script, I have embedded the spreadsheet in a webapp html using an iframe.</p>
  <p>The iframe url is a /edit url. When the webapp is run using a laptop, it works well, but after I open using a ipad or mobile the iframe is loaded with htmlView url automatically even though the sheet has edit URL.</p>
  <p>How do I force the iframe to load the edit url of the sheet in any device.</p>
  <p><strong>iPAD/Mobile view</strong></p>
  <p><img src="https://i.stack.imgur.com/17M6n.png" alt="enter image description here" /></p>
  <p><strong>Laptop or desktop view</strong></p>
  <p><a href="https://i.stack.imgur.com/06TZh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/06TZh.png" alt="enter image description here" /></a></p>
  <p>I have tried with:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;base target="_top"&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
  &lt;h3&gt;This is test1&lt;/h3&gt;
      &lt;style&gt;
          iframe {
              width: 100%;
              height: 1600px;
              background: url('data:image/svg+xml;charset=utf-8,&lt;svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100% 100%"&gt;&lt;text fill="%23FF0000" x="50%" y="50%" font-family="\'Lucida Grande\', sans-serif" font-size="24" text-anchor="middle"&gt;Loading...&lt;/text&gt;&lt;/svg&gt;') 0px 0px no-repeat;
          }
      &lt;/style&gt;
  
  &lt;iframe class="second-row" src="https://docs.google.com/spreadsheets/d/1usDFz5VnURHYodpT6A9HGFKSHx65ATU1_0Qml2-hAec/edit?&amp;rm=minimal" frameborder="0"&gt;&lt;/iframe&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <pre><code>    function doGet() {
    return HtmlService
        .createTemplateFromFile('Index')
        .evaluate();
  }
  </code></pre>