raxjs / rax-components

Rax base components
https://github.com/alibaba/rax
Other
90 stars 74 forks source link

rax-textinput 在 iOS 上删除中间的文字光标跳转到末尾 #464

Open ClarkXia opened 2 years ago

ClarkXia commented 2 years ago

复现代码:

import { createElement, useState } from 'rax';
import View from 'rax-view';
import TextInput from 'rax-textinput';

import styles from './index.module.css';

export default function Home() {
  let [value, setValue] = useState('');

  const handleInput = (e) => {
    setValue(e.value);
  }

  return (
    <View className={styles.homeContainer}>
      请输入文案:
      <TextInput 
        className={styles.input}
        value={value}
        onInput={handleInput}
      />
      {value}
    </View>
  );
}

复现视频:

https://user-images.githubusercontent.com/4219965/186596284-c83a69c3-0466-40fb-b822-a99e8794c4ab.MOV

KaiOrange commented 2 years ago

现在还没改好吗?