@mpxjs/webpack-plugin 2.10.14-beta.10 → 2.10.14-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -158,12 +158,12 @@ const Input = forwardRef((props, ref) => {
|
|
|
158
158
|
if (!keyboardAvoid?.current) {
|
|
159
159
|
setKeyboardAvoidContext();
|
|
160
160
|
}
|
|
161
|
-
if (
|
|
161
|
+
if (keyboardAvoid?.current) {
|
|
162
162
|
const focusAction = () => {
|
|
163
|
-
bindfocus(getCustomEvent('focus', evt, {
|
|
163
|
+
bindfocus?.(getCustomEvent('focus', evt, {
|
|
164
164
|
detail: {
|
|
165
165
|
value: tmpValue.current || '',
|
|
166
|
-
height: keyboardAvoid.current?.keyboardHeight
|
|
166
|
+
height: keyboardAvoid.current?.keyboardHeight
|
|
167
167
|
},
|
|
168
168
|
layoutRef
|
|
169
169
|
}, props));
|
|
@@ -32,7 +32,9 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
|
|
|
32
32
|
// 修复 Android 点击键盘收起按钮时当前 input 没触发失焦的问题
|
|
33
33
|
inputRef.blur();
|
|
34
34
|
}
|
|
35
|
-
keyboardAvoid.current
|
|
35
|
+
if (!keyboardAvoid.current.onKeyboardShow) {
|
|
36
|
+
keyboardAvoid.current = null;
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
cancelAnimation(offset);
|
|
38
40
|
offset.value = withTiming(0, { duration, easing });
|
|
@@ -301,16 +301,16 @@ const Input = forwardRef<HandlerRef<TextInput, FinalInputProps>, FinalInputProps
|
|
|
301
301
|
setKeyboardAvoidContext()
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
if (
|
|
304
|
+
if (keyboardAvoid?.current) {
|
|
305
305
|
const focusAction = () => {
|
|
306
|
-
bindfocus(
|
|
306
|
+
bindfocus?.(
|
|
307
307
|
getCustomEvent(
|
|
308
308
|
'focus',
|
|
309
309
|
evt,
|
|
310
310
|
{
|
|
311
311
|
detail: {
|
|
312
312
|
value: tmpValue.current || '',
|
|
313
|
-
height: keyboardAvoid.current?.keyboardHeight
|
|
313
|
+
height: keyboardAvoid.current?.keyboardHeight
|
|
314
314
|
},
|
|
315
315
|
layoutRef
|
|
316
316
|
},
|
|
@@ -45,7 +45,9 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }: Keyboa
|
|
|
45
45
|
// 修复 Android 点击键盘收起按钮时当前 input 没触发失焦的问题
|
|
46
46
|
inputRef.blur()
|
|
47
47
|
}
|
|
48
|
-
keyboardAvoid.current
|
|
48
|
+
if (!keyboardAvoid.current.onKeyboardShow) {
|
|
49
|
+
keyboardAvoid.current = null
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
cancelAnimation(offset)
|