jquery datepicker not hiding on ios when clicked on background

前端 未结 1 1044
小蘑菇
小蘑菇 2021-01-25 09:58

I have a small problem with the jquery datepicker and ios.

When clicked on the input field the datepicker appears as expected. But when clicked on the background (withou

1条回答
  •  情深已故
    2021-01-25 10:37

    I know this response is a bit late, but I just ran across this same issue when testing on my iPhone. I think this may be a longstanding jquery ui bug.

    See this ticket detailing the issue: http://bugs.jqueryui.com/ticket/9308

    And this page detailing the root cause and possible workarounds: https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile

    Safari Mobile 7.0+ (and likely earlier versions too) suffers from a bug where click events aren't fired on elements that aren't typically interactive (e.g. ) and which also don't have event listeners directly attached to the elements themselves (i.e. event delegation is being used). See this live example for a demonstration. See also Safari's docs on making elements clickable and the definition of "clickable element".

    Known workarounds for this bug:

    0 讨论(0)
提交回复
热议问题