mirror of
https://github.com/fastmail/Squire.git
synced 2025-01-03 05:00:13 -05:00
parent
632aae016b
commit
283a7d1d85
3 changed files with 3 additions and 3 deletions
|
@ -2709,7 +2709,7 @@ proto.fireEvent = function ( type, event ) {
|
||||||
// focus event to fire after the blur event, which can cause an infinite
|
// focus event to fire after the blur event, which can cause an infinite
|
||||||
// loop. So we detect whether we're actually focused/blurred before firing.
|
// loop. So we detect whether we're actually focused/blurred before firing.
|
||||||
if ( /^(?:focus|blur)/.test( type ) ) {
|
if ( /^(?:focus|blur)/.test( type ) ) {
|
||||||
isFocused = isOrContains( this._root, this._doc.activeElement );
|
isFocused = this._root === this._doc.activeElement;
|
||||||
if ( type === 'focus' ) {
|
if ( type === 'focus' ) {
|
||||||
if ( !isFocused || this._isFocused ) {
|
if ( !isFocused || this._isFocused ) {
|
||||||
return this;
|
return this;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -255,7 +255,7 @@ proto.fireEvent = function ( type, event ) {
|
||||||
// focus event to fire after the blur event, which can cause an infinite
|
// focus event to fire after the blur event, which can cause an infinite
|
||||||
// loop. So we detect whether we're actually focused/blurred before firing.
|
// loop. So we detect whether we're actually focused/blurred before firing.
|
||||||
if ( /^(?:focus|blur)/.test( type ) ) {
|
if ( /^(?:focus|blur)/.test( type ) ) {
|
||||||
isFocused = isOrContains( this._root, this._doc.activeElement );
|
isFocused = this._root === this._doc.activeElement;
|
||||||
if ( type === 'focus' ) {
|
if ( type === 'focus' ) {
|
||||||
if ( !isFocused || this._isFocused ) {
|
if ( !isFocused || this._isFocused ) {
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in a new issue