WP7 IE - CSS modal popup: Taps/Clicks go through overlay div and trigger links that should be invisible

前端 未结 3 1114
星月不相逢
星月不相逢 2021-01-23 11:27

I am making a HTML/CSS and jQuery-based file manager aimed at mobile devices. Part of it involves the use of CSS=based modal dialog boxes for various file operations (copy, dele

3条回答
  •  梦毁少年i
    2021-01-23 12:08

    OK, so it seems that there may be no "proper" solution to this problem (hey, 24 hours is a long time on SO!), so I have come up with my own hack solution:

    I when the modal dialog box is opened, I simultaneously set the "visibility" CSS property of all the elements "behind" the overlay (i.e. links and anything else that would otherwise erroneously respond to taps/clicks) to "hidden" (by using jQuery's .css() function). This means that the page layout is not affected, and that there is now nothing there to be clicked on.

    As I said, this is a bit of a hack and will not be suitable for everyone who runs into this problem. However, it works well for me.

    Code in jsFiddle: http://jsfiddle.net/michaelbromley/CHU76/1/

提交回复
热议问题