1

In the current minimal example (http://jsfiddle.net/twPHW/) :

<div style="overflow: hidden; height: 24px;">

<table>
<thead>
<tr>
<td style="background-color: rgb(109,173,157);">foo</td>
</tr>
</thead>
<tbody>
<tr>
<td style="background-color: rgb(236,222,117);">bar</td>
</tr>
</tbody></table>

</div>

The "foo" cell is the only one visible. Then if I do Ctrl-F (find feature in browser), and start typing "bar", the table inside the div will goes up (its top changes) to show to the user the matched element.

I know it could be a feature, but to me it appears to be a bug because it modifies the layout of the web page (clearing the search does not rollback previous top element).

This bug occurs in Chrome and IE9 but not in Firefox.

Any workaround that could fix the issue ?

PS: this seems to be related Browser ctrl+f find on the page shows result behind the static header but does not answer my question

Community
  • 1
  • 1
JBE
  • 11,917
  • 7
  • 49
  • 51
  • is there a certain reason you have to overflow:hidden and hard-set height on the div? Especially with it being so small height-wise. – cschneider27 Feb 26 '13 at 18:26
  • Well I just tried to find the smallest piece of code which could reproduce the issue ... my real use case is different and more complex. – JBE Feb 26 '13 at 18:28

1 Answers1

0

Overflow content is still searchable. If you don't want it shown, use display:none

idrumgood
  • 4,904
  • 19
  • 29
  • As it is closed I can't add my own answer. Using ``display: none`` would affect my layout, I used ``visibility: hidden`` instead and it worked. – JBE Feb 28 '13 at 13:59