mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Merge pull request #217 from nhnent/enforce-fireEvent-after-focus-blur-method-invoked
Fire focus or blur event manually in focus/blur method for MSIE
This commit is contained in:
commit
989c8f10b4
2 changed files with 11 additions and 0 deletions
|
@ -34,6 +34,7 @@ var isIElt11 = /Trident\/[456]\./.test( ua );
|
|||
var isPresto = !!win.opera;
|
||||
var isEdge = /Edge\//.test( ua );
|
||||
var isWebKit = !isEdge && /WebKit\//.test( ua );
|
||||
var isIE = /Trident\/[4567]\./.test( ua );
|
||||
|
||||
var ctrlKey = isMac ? 'meta-' : 'ctrl-';
|
||||
|
||||
|
|
|
@ -619,11 +619,21 @@ proto._updatePathOnEvent = function () {
|
|||
|
||||
proto.focus = function () {
|
||||
this._root.focus();
|
||||
|
||||
if ( isIE ) {
|
||||
this.fireEvent( 'focus' );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
proto.blur = function () {
|
||||
this._root.blur();
|
||||
|
||||
if ( isIE ) {
|
||||
this.fireEvent( 'blur' );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue