Richard Z wrote on 02.06.2016 20:33:
Hi,

noticed that Fennec behaves very differently than Chrome
when webpages do explicitly set focus to input fields by
javascript.
Fennec will focus that field and popup the keyboard whereas
Chrome seems to completely ignore the .focus() call.

 From my perspective the behaviour of Chrome seems better - the
popup keyboard can be highly irritating when unexpected while
tapping an input field which I want to edit is very easy.

Even wrote a trivial addon which deals with one site where our
behavior is very annoying
  https://addons.mozilla.org/en-US/firefox/addon/pubmedunfocus/

Has that been discussed before?

FWIW, I wrote a webapp, with a note taking function. When you invoke this function, you see an <textarea> and I had to explicitly call focus() in order to show the keyboard.

IIRC it also had to do something with scrolling and page size - without keyboard, the page is larger and renders differently. Once I enabled the keyboard, it covered important UI buttons, and I couldn't save. Once I opened the keyboard automatically, and automatically scrolled correctly after (!) the keyboard opened, Fennec sized the page correctly from the start, and my app could scroll it properly so that all UI elements show. If the user manually opens the keyboard, it's more difficult from an app standpoint.

At least that's what I remember vaguely - it's now a few years ago that I wrote it.

In short, focus() was very important and allowed me
* to make the UI more comfortable
* and more obvious (it's a note-taking app - where's the keyboard????)
* to avoid a serious bug


_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to