@mpxjs/webpack-plugin 2.10.18-beta.3 → 2.10.18-beta.5
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.
- package/lib/platform/style/wx/index.js +1 -1
- package/lib/runtime/components/react/dist/mpx-input.jsx +4 -1
- package/lib/runtime/components/react/dist/utils.jsx +1 -1
- package/lib/runtime/components/react/mpx-input.tsx +4 -1
- package/lib/runtime/components/react/utils.tsx +1 -1
- package/package.json +1 -1
|
@@ -422,7 +422,7 @@ module.exports = function getSpec({ warn, error }) {
|
|
|
422
422
|
if (Array.isArray(value) || cssVariableExp.test(value)) return { prop, value }
|
|
423
423
|
const values = parseValues(value)
|
|
424
424
|
// Todo transform 排序不一致时,transform动画会闪烁,故这里同样的排序输出 transform
|
|
425
|
-
values.sort()
|
|
425
|
+
// values.sort()
|
|
426
426
|
const transform = []
|
|
427
427
|
values.forEach(item => {
|
|
428
428
|
const match = item.match(/([/\w]+)\((.+)\)/)
|
|
@@ -145,7 +145,10 @@ const Input = forwardRef((props, ref) => {
|
|
|
145
145
|
};
|
|
146
146
|
const setKeyboardAvoidContext = () => {
|
|
147
147
|
if (keyboardAvoid) {
|
|
148
|
-
|
|
148
|
+
// readyToShow 仅在从另一个输入框切换聚焦时为 true(ref 不同),
|
|
149
|
+
// 避免同一个输入框重复调用(onTouchStart + useEffect)或单次聚焦时误设为 true 导致无法正常失焦
|
|
150
|
+
const readyToShow = !!(keyboardAvoid.current && keyboardAvoid.current.ref !== nodeRef);
|
|
151
|
+
keyboardAvoid.current = { cursorSpacing, ref: nodeRef, adjustPosition, holdKeyboard, readyToShow };
|
|
149
152
|
}
|
|
150
153
|
};
|
|
151
154
|
const onTouchStart = () => {
|
|
@@ -285,7 +285,7 @@ export function parseValues(str, char = ' ') {
|
|
|
285
285
|
function parseTransform(transformStr) {
|
|
286
286
|
const values = parseValues(transformStr);
|
|
287
287
|
// Todo transform 排序不一致时,transform动画会闪烁,故这里同样的排序输出 transform
|
|
288
|
-
values.sort()
|
|
288
|
+
// values.sort()
|
|
289
289
|
const transform = [];
|
|
290
290
|
values.forEach(item => {
|
|
291
291
|
const match = item.match(/([/\w]+)\((.+)\)/);
|
|
@@ -285,7 +285,10 @@ const Input = forwardRef<HandlerRef<TextInput, FinalInputProps>, FinalInputProps
|
|
|
285
285
|
|
|
286
286
|
const setKeyboardAvoidContext = () => {
|
|
287
287
|
if (keyboardAvoid) {
|
|
288
|
-
|
|
288
|
+
// readyToShow 仅在从另一个输入框切换聚焦时为 true(ref 不同),
|
|
289
|
+
// 避免同一个输入框重复调用(onTouchStart + useEffect)或单次聚焦时误设为 true 导致无法正常失焦
|
|
290
|
+
const readyToShow = !!(keyboardAvoid.current && keyboardAvoid.current.ref !== nodeRef)
|
|
291
|
+
keyboardAvoid.current = { cursorSpacing, ref: nodeRef, adjustPosition, holdKeyboard, readyToShow }
|
|
289
292
|
}
|
|
290
293
|
}
|
|
291
294
|
|
|
@@ -335,7 +335,7 @@ export function parseValues (str: string, char = ' ') {
|
|
|
335
335
|
function parseTransform (transformStr: string) {
|
|
336
336
|
const values = parseValues(transformStr)
|
|
337
337
|
// Todo transform 排序不一致时,transform动画会闪烁,故这里同样的排序输出 transform
|
|
338
|
-
values.sort()
|
|
338
|
+
// values.sort()
|
|
339
339
|
const transform: { [propName: string]: string | number | number[] }[] = []
|
|
340
340
|
values.forEach(item => {
|
|
341
341
|
const match = item.match(/([/\w]+)\((.+)\)/)
|