Overflow hidden and input text scrolling in Google Chrome -


here code snippet:

http://jsfiddle.net/7cubv/6/

if click , drag on input text field, div overflow:hidden scrolling overflow:auto. if set overflow:hidden on div, want scrolling locked other browsers do.

the curious thing if set padding:0px on input field, issue on chrome not occur anymore.

is google chrome bug? workaround make work without use of javascript?

edit: behaviour happens on safari 5 too. maybe webkit issue.

here's fixed me:

input:active { pointer-events:none; } 

thanks https://stackoverflow.com/users/498031/vken pointing out on @ similar question: issue click-drag-select in text input field scrolls parent element, webkit bug or feature?

update 2013-11: pointer-events:none fixes issue comes numerous disadvantages. best workaround issue make sure have no overflowing content in "the content of overflow:hidden container not bigger said container. if want scroll content in via javascript, give width&height=0 long it's hidden , resize right before moving in (easily done keyframe-animations or timed transitions)

important: encountered weird case customized <input type=file> field in chrome should not have caused overflow-issues resized via css - dev-tools confirmed that, but: after taking @ shadow-dom realized chrome's own "buttons" overflowed actual input-field , therefore caused entire container bigger.

how show shadow-dom: if things right , still issue go chrome dev-tools, click on settings-button in lower right corner. on "general"-tab in section "elements" option enable "show shadow dom". give entire picture of what's going on... though of time adds layer of complexity, here it's helpful!


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -