Preventing ctrl f browser search from scrolling my minimized div

I have a panel that crashes by setting the width of the wrapper div so that it is much smaller than the width of the content. However, when I use ctrl fto search for words, my minimized panel scrolls, i.e. the scrollLeftwrapper's div wrapper attribute is no longer 0. This is a problem because I don't want it to scroll, as it distorts the user interface.

Is there a way to prevent automatic scroll searching in my folded panel? Is there some kind of event that I can block (focus?) So that I can reset scrollLeftto equal 0 each time I start a browser search or CSS that I can set?

I do not use jQuery, so everything related to jQuery is not an option.

+5
source share
2 answers

This is the default functionality of any browser and the functionality that users expect by eliminating it or preventing it, giving developers the opportunity to seriously change the user interface and, as a rule, is not possible, as well as a good idea.

In doing so, the first sentences that I have are as follows

1) set the CSS display of the object or its contents to "No" after full collapse.
2) delete the contents when minimizing and save it in memory to insert back when opening minimized contents.
3) after opening the minimized element, set scrollLeft to 0.

+1

: div?

0

All Articles