mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Don't focus body in non-Gecko.
Opera loses selection. Only Gecko seems to need it.
This commit is contained in:
parent
2fe603ba8b
commit
cfb08691c2
1 changed files with 4 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
var isOpera = !!win.opera;
|
||||
var isIE = !!win.ie;
|
||||
var isGecko = /Gecko\//.test( navigator.userAgent );
|
||||
var isIOS = /iP(?:ad|hone|od)/.test( navigator.userAgent );
|
||||
var useTextFixer = isIE || isOpera;
|
||||
|
||||
|
@ -189,7 +190,9 @@
|
|||
var focus = function () {
|
||||
// FF seems to need the body to be focussed
|
||||
// (at least on first load).
|
||||
body.focus();
|
||||
if ( isGecko ) {
|
||||
body.focus();
|
||||
}
|
||||
win.focus();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue