0

I've run into an issue I've never seen before with the browser we all know and love. On this page - http://weresayingido.com/register - the labels and help text don't display normally in IE. However, flashing the Datepicker quickly using the following code causes all the text to render normally.

// IE detection hackery
if ('\v' == 'v') {
  // Flash the Datepicker UI
  $('input[name="date"]').focus();
  $('input[name="date"]').blur();
  setTimeout("$('body').mousedown()", 1);
}

(Yes, the setTimeout is necessary, otherwise the Datepicker block just stays there. No, I don't know why that is, but I would love to know.)

Given that this is by all means a rather hacky hack, I'm wondering why this happens and if it's possible to replicate without using this trickery, particularly using just CSS/HTML. Anyone happen to know the answers to these?

tl;dr: Something jQuery UI Datepicker is doing is forcing text to render visibly in IE 7 that otherwise doesn't. Can I fix this with just CSS/HTML?

Relevant links:

4

1 に答える 1

1

IE7 は を嫌い、実際の要素visibilityを考慮しません。body

ページを常に表示しておきます (これは、JavaScript を使用していない不幸なユーザーにとっても良いことです)。どうしても必要な場合は、style.css で使用body {display: none;}し、script.js で可視化し$('body').show()てください。から離れてvisibilityください。

乾杯。

于 2012-04-25T23:02:11.693 に答える