Code Monkey home page Code Monkey logo

batextview's Issues

限制最大输入字数有bug,如果末尾输入emoji表情就会被截断,乱码

demo中限制最大输入字数的逻辑是等到字数改变后获取最大长度再截取,再截取前面的最大字数,这样有问题 假如我限制输入10个数字,输了了9个汉字后,输入一个emoji表情,有的emoji表情长度是2 有的是4 ,这样截取的话,emoji就会乱码,
image

还有一个问题,我觉得不好,就是我输入9个汉字后,光标切换到中间位置,中文联想输入,然后点击后,你们的处理方式是文字改变后才截取,也就是联想的部分已经输入进去了,你把后面的截断了,我觉得最好的处理方式是:当我输入了9个汉字后 ,后面如果是联想输入的汉字,只让联想的这串汉字的第一个显示到输入框才对

发现了一个小bug

就是我限制了字数个数,粘贴过多的数字文字会发现,文本消失,变的空白,在滚动或者输入换行符文字又出现了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.