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 (like if its top changes) to show to the user the matched element.
I want to be able to look for "bar" through find feature, but I want to handle that layout modification through javascript.
I know it is not possible to listen for browser "find". I just would like to listen to this layout modification in order to prevent it or synchronize the rest of my view accordingly. I tried to listen to scroll events or to use Chrome Mutation Observer but it did not work. Any idea ?
- Similar Stackoverflow ticket about layout modifications : Ctrl F/Find feature in Chrome and IE modifies layout
- Ticket on Chromium dev channel tracker regarding the layout modification : Chromium Issue 318191