Browse Source

Merge remote-tracking branch 'origin/master'

es6
guy 3 years ago
parent
commit
e243fb3f7a
  1. 2
      package.json
  2. 11
      src/base/single/input/input.js

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20211202090501",
"version": "2.0.20211203152451",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

11
src/base/single/input/input.js

@ -24,7 +24,7 @@ BI.Input = BI.inherit(BI.Single, {
var _keydown = BI.debounce(function (keyCode) {
self.onKeyDown(keyCode, ctrlKey);
self._keydown_ = false;
}, BI.EVENT_RESPONSE_TIME);
}, 300);
var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, {
"leading": true,
"trailing": false
@ -33,7 +33,10 @@ BI.Input = BI.inherit(BI.Single, {
"leading": true,
"trailing": false
});
this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME);
this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, {
"leading": true,
"trailing": false
});
this.element
.keydown(function (e) {
inputEventValid = false;
@ -92,7 +95,11 @@ BI.Input = BI.inherit(BI.Single, {
_blur: function () {
var self = this;
if (self._keydown_ === true) {
BI.delay(blur, 300);
} else {
blur();
}
function blur () {
if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) {

Loading…
Cancel
Save