mirror of
https://github.com/fastmail/Squire.git
synced 2025-01-03 05:00:13 -05:00
Fix selection lost on action in Presto
This commit is contained in:
parent
54b428aaa6
commit
797dbf46fb
3 changed files with 9 additions and 3 deletions
|
@ -1413,7 +1413,10 @@ proto.focus = function () {
|
|||
// FF seems to need the body to be focussed (at least on first load).
|
||||
// Chrome also now needs body to be focussed in order to show the cursor
|
||||
// (otherwise it is focussed, but the cursor doesn't appear).
|
||||
this._body.focus();
|
||||
// Opera (Presto-variant) however will lose the selection if you call this!
|
||||
if ( !isPresto ) {
|
||||
this._body.focus();
|
||||
}
|
||||
this._win.focus();
|
||||
return this;
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -337,7 +337,10 @@ proto.focus = function () {
|
|||
// FF seems to need the body to be focussed (at least on first load).
|
||||
// Chrome also now needs body to be focussed in order to show the cursor
|
||||
// (otherwise it is focussed, but the cursor doesn't appear).
|
||||
this._body.focus();
|
||||
// Opera (Presto-variant) however will lose the selection if you call this!
|
||||
if ( !isPresto ) {
|
||||
this._body.focus();
|
||||
}
|
||||
this._win.focus();
|
||||
return this;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue