Mobile Safari: link () element over video element does not work on click

前端 未结 5 1573
轻奢々
轻奢々 2020-12-09 04:19

my current project is a html website that contains a dropdown menu (javascript/jquery) and a html5 videoplayer (video-tag only).

When clicking on a menu entry, the d

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 04:53

    explanation: the html5 video player absorbs the touch events if controls are enabled.

    background: the menu overlayed the video container when dropped down, but the menu item links were not clickable.

    solution: as a workaround i temporarily disable the controls by removing the html video attribute "controls" with javascript when the menu is dropped down, and re-add the "controls" attribute when the menu is dropped up again.

提交回复
热议问题