Overflow hidden and input text scrolling in Google Chrome

后端 未结 4 1089
梦谈多话
梦谈多话 2021-01-19 13:07

Here is my code snippet:

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

If i click and drag over the input text field, I get the div with overflow:hidden scrolling as it would

4条回答
  •  孤城傲影
    2021-01-19 13:27

    Set scrollLeft and/or scrollTop to 0 in the "onscroll" event, this will disable scrolling:

    var div = $(".overflow-hidden");
    div.scroll(function() { div.scrollTop(0).scrollLeft(0); });
    

提交回复
热议问题