Browse Source

Pull request #1497: DEC-14919 fix: IE11在浏览器重新获得焦点之后会先触发focusout再触发focus,要保持先获得焦点再失去焦点的顺序不变,因此采用blur

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '3324a7aec556258267780b20ade3d9836844d80a':
  DEC-14919 fix:  IE11在浏览器重新获得焦点之后会先触发focusout再触发focus,要保持先获得焦点再失去焦点的顺序不变,因此采用blur
es6
guy 4 years ago
parent
commit
26babde995
  1. 3
      src/base/single/input/input.js

3
src/base/single/input/input.js

@ -74,7 +74,8 @@ BI.Input = BI.inherit(BI.Single, {
.focus(function (e) { // 可以不用冒泡 .focus(function (e) { // 可以不用冒泡
self._focusDebounce(); self._focusDebounce();
}) })
.focusout(function (e) { .blur(function (e) {
// DEC-14919 IE11在浏览器重新获得焦点之后会先触发focusout再触发focus,要保持先获得焦点再失去焦点的顺序不变,因此采用blur
self._blurDebounce(); self._blurDebounce();
}); });
if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) { if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {

Loading…
Cancel
Save