iframe causes parent elements to scroll up on Google Chrome when URL contains fragment

后端 未结 5 806
南旧
南旧 2021-02-04 11:53

On Google Chrome (37.0.2062.122, OSX / Windows), an iframe with an URL containing a fragment causes the parent elements to scroll up.

It\'s only happening in Chrome (tes

5条回答
  •  温柔的废话
    2021-02-04 12:27

    Reproducing script

    Found a minimal way to reproduce the bug: http://jsfiddle.net/4oytgwon/1/embedded/result/ (you can see the bug happening after clicking on "load iframe").

    It also happens outside of jsfiddle using the following code:

    
    
        
            
            
        
        
            
            
    overflow

提交回复
热议问题