Search code examples
javascripthtmlmobilefirefox-os

Prevent keyboard from shrinking viewport


In Firefox OS 1.3, when the keyboard slides in, then the browser's/app's viewport height is reduced.

Simple test page/app illustrating the issue:

<!doctype html>
<title>Test</title>
<div id="log"></div>
<input style="width: 100px" />
<script>
  setInterval(function () {
      document.getElementById('log').innerHTML = window.innerHeight;
  }, 100);
</script>

Is there some way to configure a Firefox OS web app not to shrink viewport height when the keyboard slides in?


Solution

  • No, there are plans to facilitate this from manifest file in the future. It will be opt-in though. The implementation bug is here: https://bugzilla.mozilla.org/show_bug.cgi?id=970093