MacGapProject / MacGap2

MacGap 2
MIT License
1.19k stars 85 forks source link

Flashing top bar while scrolling #97

Open tbrodbeck opened 4 years ago

tbrodbeck commented 4 years ago

When I use MacGap to wrap Google Keep it works beautifully. There is unfortunately still one issue: The top bar of the website is flashing while I am scrolling. Jan-19-2020 09-38-15 This is my complete index.html for reproduction - but its nothing special, it just wraps Google Keep (and I am using macOS Catalina btw):

<!DOCTYPE html>
<html>
<head>
  <title>MacGap</title>

  <style type="text/css" media="screen">
    html, body {
      height: 100%;
      width: 100%;
      background: #FFF;
      padding: 0;
      margin: 0;
      overflow: hidden;
      -webkit-user-select: none;
    }

    h1 {
      color: #E0E0E0;
      margin: 18% 0;
      text-align: center;
      font-family: helvetica;
    }
  </style>

</head>
<body>

  <script type="text/javascript" charset="utf-8">
      MacGap.Window.resize(900, 1000)
      window.location.href = 'https://keep.google.com';
  </script>

</body>
</html>
jeff-h commented 4 years ago

I can't see anything obviously wrong with your code. Does the same flashing occur when you load that html into Safari? (obviously you'd need to comment-out the MacGap line in your JavaScript).

tbrodbeck commented 4 years ago

I don't think there is something wrong with the code. There is something wrong with the graphics engine of MacGaps on my system. I just wanted to present the code as a MWE. The script works both on Safari and Chrome.

jeff-h commented 4 years ago

MacGap has no bespoke graphics engine implementation. It simply uses a webview, which should thus render identically to Safari.

I tried it with the two lines of JS you added and it works perfectly for me. Have you got a second machine you could try it with?

tbrodbeck commented 4 years ago

Ok I just tried the to wrap Google Keep (yes, the code is not any more special than that) on my Late 2012 MacBook also running Catalina and its the same story. The odd thing then is that Chrome or Safari render it differently than MacGaps. Would it help you if I make a gif or video of the problem?

jeff-h commented 4 years ago

Gif sounds good — perhaps I'm seeing the issue but not recognising it as such.

tbrodbeck commented 4 years ago

Ok sure: Jan-19-2020 09-38-15 You can imagine that everything else of the window renders just fine.

Sorry I could have presented a gif way earlier. It was easier to create than I thought^^