0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Fix cursor no longer appears on focus in Chrome.

This commit is contained in:
Neil Jenkins 2014-12-07 14:33:43 +07:00
parent ae38caba31
commit 25f78ff31d
3 changed files with 9 additions and 11 deletions

View file

@ -1424,11 +1424,10 @@ proto._updatePathOnEvent = function () {
// --- Focus --- // --- Focus ---
proto.focus = function () { proto.focus = function () {
// FF seems to need the body to be focussed // FF seems to need the body to be focussed (at least on first load).
// (at least on first load). // Chrome also now needs body to be focussed in order to show the cursor
if ( isGecko ) { // (otherwise it is focussed, but the cursor doesn't appear).
this._body.focus(); this._body.focus();
}
this._win.focus(); this._win.focus();
return this; return this;
}; };

File diff suppressed because one or more lines are too long

View file

@ -339,11 +339,10 @@ proto._updatePathOnEvent = function () {
// --- Focus --- // --- Focus ---
proto.focus = function () { proto.focus = function () {
// FF seems to need the body to be focussed // FF seems to need the body to be focussed (at least on first load).
// (at least on first load). // Chrome also now needs body to be focussed in order to show the cursor
if ( isGecko ) { // (otherwise it is focussed, but the cursor doesn't appear).
this._body.focus(); this._body.focus();
}
this._win.focus(); this._win.focus();
return this; return this;
}; };