file input javascript click generated not from a real mouse click chrome

前端 未结 2 1805
栀梦
栀梦 2020-12-20 08:07

i\'m having trouble in chrome opening the popup for the file upload of a file input type.

As you can see here: http://jsfiddle.net/cavax/K99gg/3/, clicking on an ele

2条回答
  •  -上瘾入骨i
    2020-12-20 08:49

    If I remember correctly, mouseenter and mouseleave are specific to IE, not standard events. Maybe they were extended, but don't think they became a standard. So the event itself may generate you some problems.

    To resolve this you can use a lib (like jQuery for example), that treats the browser differences (or you can check the code there and take what you need).

    Second way... try mouseover... it worked better (again... didn't work with them for a while so things may have happened, but this is how I remember them to be).

提交回复
热议问题