|
@@ -15,6 +15,7 @@ export interface InputAdapter extends Partial<DefaultAdapter>, Partial<InputDefa
|
|
notifyBlur(value: any, e: any): void;
|
|
notifyBlur(value: any, e: any): void;
|
|
setEyeClosed(eyeClosed: boolean): void;
|
|
setEyeClosed(eyeClosed: boolean): void;
|
|
toggleFocusing(focused: boolean): void;
|
|
toggleFocusing(focused: boolean): void;
|
|
|
|
+ focusInput(): void;
|
|
notifyFocus(value: any, e: any): void;
|
|
notifyFocus(value: any, e: any): void;
|
|
notifyInput(e: any): void;
|
|
notifyInput(e: any): void;
|
|
notifyKeyDown(e: any): void;
|
|
notifyKeyDown(e: any): void;
|
|
@@ -198,6 +199,7 @@ class InputFoundation extends BaseFoundation<InputAdapter> {
|
|
}
|
|
}
|
|
// do not handle bubbling up events
|
|
// do not handle bubbling up events
|
|
if (this._adapter.isEventTarget(e)) {
|
|
if (this._adapter.isEventTarget(e)) {
|
|
|
|
+ this._adapter.focusInput();
|
|
this._adapter.toggleFocusing(true);
|
|
this._adapter.toggleFocusing(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -212,6 +214,7 @@ class InputFoundation extends BaseFoundation<InputAdapter> {
|
|
|
|
|
|
handleClickEye(e: any) {
|
|
handleClickEye(e: any) {
|
|
const eyeClosed = this._adapter.getState('eyeClosed');
|
|
const eyeClosed = this._adapter.getState('eyeClosed');
|
|
|
|
+ this._adapter.focusInput();
|
|
this._adapter.toggleFocusing(true);
|
|
this._adapter.toggleFocusing(true);
|
|
this._adapter.setEyeClosed(!eyeClosed);
|
|
this._adapter.setEyeClosed(!eyeClosed);
|
|
}
|
|
}
|
|
@@ -276,6 +279,7 @@ class InputFoundation extends BaseFoundation<InputAdapter> {
|
|
const { disabled } = this._adapter.getProps();
|
|
const { disabled } = this._adapter.getProps();
|
|
const { isFocus } = this._adapter.getStates();
|
|
const { isFocus } = this._adapter.getStates();
|
|
if (!disabled && !isFocus) {
|
|
if (!disabled && !isFocus) {
|
|
|
|
+ this._adapter.focusInput();
|
|
this._adapter.toggleFocusing(true);
|
|
this._adapter.toggleFocusing(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -288,6 +292,7 @@ class InputFoundation extends BaseFoundation<InputAdapter> {
|
|
if (e && isFunction(e.preventDefault)) {
|
|
if (e && isFunction(e.preventDefault)) {
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
|
|
+ e.stopPropagation();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|