Fix autofocus functionality for Firefox - Fix #365