Coder Social home page Coder Social logo

Comments (4)

webyuanzheng avatar webyuanzheng commented on August 27, 2024 8

FastClick.prototype.focus = function (targetElement) {
let length;
if (targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
length = targetElement.value.length;
targetElement.focus();
targetElement.setSelectionRange(length, length);
} else {
targetElement.focus();
}
}
//加上这段代码完美解决

from fastclick.

linking2014 avatar linking2014 commented on August 27, 2024 2

需要点击好多次文本框,键盘才会弹出

这里有篇文章
http://www.php.cn/js-tutorial-387360.html

from fastclick.

betterTry avatar betterTry commented on August 27, 2024

可以看下这个commit https://github.com/betterTry/fastclick/commit/342a6641500c40b7167ef7f21439d29fc6e21263

from fastclick.

AntiMoron avatar AntiMoron commented on August 27, 2024

我能被这个库气死。接手一下很久的项目看了半天 还奇怪为啥、

在contenteditable的div上试了真的有半天的时间都无解

试试注释掉以前的人在公共文件里写的FastClick.attech(body)就好了,

然后才找到本帖save my day.

from fastclick.

Related Issues (20)

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.