focus() not working in safari or chrome

前端 未结 6 2064
别那么骄傲
别那么骄傲 2020-11-30 11:25

I have a div that has been given a tabindex, when the div is focused(click or tabbed to) it does the following:

inserts an input into itself, gives the input focus

6条回答
  •  自闭症患者
    2020-11-30 11:52

    I got a similar problem with the latest chrome release, and I found out that I had in my css-reset the following

    -webkit-user-select: none; 
    -khtml-user-select: none; 
    -moz-user-select: none; 
    -o-user-select: none; 
    user-select: none;
    

    the result was that in chrome i couldn't even input text... in firefox it was possible

提交回复
热议问题