亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

The input element's type ('number')

CoderDock / 2342人閱讀

fastclick.js?bf9a:331 Uncaught DOMException: Failed to execute "setSelectionRange" on "HTMLInputElement": The input element"s type ("number") does not support selection

解決方法:

找到node_module中的文件fastclick.js, line: 327 將

if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf("date") !== 0 && targetElement.type !== "time" && targetElement.type !== "month") {
            length = targetElement.value.length;
            targetElement.setSelectionRange(length, length);
        } else {
            targetElement.focus();
    }

替換為:

var useSelectionRange = deviceIsIOS;
    if(useSelectionRange){
        try{
            length = targetElement.value.length;
            targetElement.setSelectionRange(length, length);
        }catch(error){
            useSelectionRange = false;
        }
    }
    if (!useSelectionRange) {
        targetElement.focus();
    }

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://www.ezyhdfw.cn/yun/97397.html

相關(guān)文章

  • H5 input[type='date'] 優(yōu)化 pc端和移動(dòng)端的使用

    標(biāo)簽在HTML5中新增了color, date, datetime, datetime-local, month, week, time, email, number, range, search, tel 以及 url新屬性。本篇記錄在開發(fā)中使用date屬性,遇到的一些問題,以及功能擴(kuò)展: 獲取當(dāng)前日期,并顯示在input[type=date]上 html: js: $(function(...

    VincentFF 評(píng)論0 收藏0
  • H5 input[type='date'] 優(yōu)化 pc端和移動(dòng)端的使用

    標(biāo)簽在HTML5中新增了color, date, datetime, datetime-local, month, week, time, email, number, range, search, tel 以及 url新屬性。本篇記錄在開發(fā)中使用date屬性,遇到的一些問題,以及功能擴(kuò)展: 獲取當(dāng)前日期,并顯示在input[type=date]上 html: js: $(function(...

    wemallshop 評(píng)論0 收藏0
  • H5 input[type='date'] 優(yōu)化 pc端和移動(dòng)端的使用

    標(biāo)簽在HTML5中新增了color, date, datetime, datetime-local, month, week, time, email, number, range, search, tel 以及 url新屬性。本篇記錄在開發(fā)中使用date屬性,遇到的一些問題,以及功能擴(kuò)展: 獲取當(dāng)前日期,并顯示在input[type=date]上 html: js: $(function(...

    haoguo 評(píng)論0 收藏0
  • the deadline of JavaScript's this

    摘要:在用處千千萬,基于自己研究和認(rèn)識(shí),今天做一個(gè)了斷??梢匀∷鶎賹?duì)象的上下文的方法稱為公共方法,可以使屬性,方法變成公開的屬性方法在構(gòu)造函數(shù),方法中用到。內(nèi)部函數(shù)調(diào)用的時(shí)候,只能搜索到其活動(dòng)對(duì)象為止,不可能直接訪問外部函數(shù)中的變量。 this this在JavaScript用處千千萬,基于自己研究和認(rèn)識(shí),今天做一個(gè)了斷。 全局,匿名函數(shù)調(diào)用 對(duì)象方法調(diào)用 閉包總指向上一級(jí) 構(gòu)造函數(shù)中,指...

    chinafgj 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<