IFrame lets you scroll down in Safari 9.0.3 OSX

For some strange reason, Safari allows me to scroll down using finger gestures inside an iFrame. However, if I use the scroll bar, I can scroll up and down. WTF ?!

This is html and css for the iframe and its shell.

#iframe-wrapper {
  -webkit-overflow-scrolling: touch !important;
  overflow-y: scroll !important;
  height: 312px;
}
#iframe-wrapper>iframe {
  border-radius: 4px;
  background-color: white;
  border: none;
  -webkit-box-shadow: inset 0px 0px 15px -5px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: inset 0px 0px 15px -5px rgba(0, 0, 0, 0.75);
  box-shadow: inset 0px 0px 15px -5px rgba(0, 0, 0, 0.75);
}
.fixed-window {
  position: fixed;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  left: 0;
  right: 0;
}
.popup {
  margin: -100px auto 100px;
  position: absolute;
  border: 0px solid white;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
  box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.4);
  max-width: 720px;
  width: 100%;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
}
#container {
  padding: 0 40px;
}
<div class="fixed-window">
  <div class="popup">
    <div id="container">
      <div class="on-submit-hide">
        <div id="iframe-wrapper">
          <iframe height="100%" width="100%" src="http://www.lipsum.com/feed/html">
          </iframe>
        </div>
      </div>
    </div>
  </div>
</div>
Run codeHide result

Why is this happening, is it a Safari bug? Has anyone else encountered this problem? In other browsers, it works fine, including ie9: weary :.

+4
source share

Source: https://habr.com/ru/post/1628102/


All Articles