Safari 10.1 position: fixed - repaint bug

Developer
Size
2,746 Kb
Views
52,624

How do I make an safari 10.1 position: fixed - repaint bug?

Enable "paint flashing" and notice how this element repaints continuously when the scroll position is changed via JS. This does not happen in Safari 10, Chrome, or Firefox.. What is a safari 10.1 position: fixed - repaint bug? How do you make a safari 10.1 position: fixed - repaint bug? This script and codes were developed by Peter Hrynkow on 18 September 2022, Sunday.

Safari 10.1 position: fixed - repaint bug Previews

Safari 10.1 position: fixed - repaint bug - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Safari 10.1 position: fixed - repaint bug</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="hero" id="hero"> <div class="hero-content"> <h1>Safari 10.1 position: fixed - repaint bug</h1> <p>Enable "paint flashing" and notice how the element with `position: fixed` repaints continuously as the scroll position is set by JavaScript. This does not happen in Safari 10, Chrome, or Firefox.
</p> <p><a href="https://bugs.webkit.org/show_bug.cgi?id=172911" target="_blank">Webkit Bug Ticket</a></p> </div>
</div>
<div class="tout"></div>
<div class="tout"></div>
<div class="tout"></div>
<div class="tout"></div>
<div class="tout"></div> <script src="js/index.js"></script>
</body>
</html>

Safari 10.1 position: fixed - repaint bug - Script Codes CSS Codes

.hero { height: 100vh; width: 100vw;
}
.hero-content { background: #0099ff; box-sizing: border-box; height: 100%; left: 50%; padding: 40px; position: fixed; top: 50%; -webkit-transform: translate3d(-50%, -50%, 0); transform: translate3d(-50%, -50%, 0); width: 100%;
}
.tout { background: #ccc; border: 4px solid #0066cc; height: 100vh; position: relative; width: 100vw; z-index: 20;
}

Safari 10.1 position: fixed - repaint bug - Script Codes JS Codes

'use strict';
{ (function () { var hero = document.getElementById('hero'); var render = function render() { window.scrollBy(0, 1); requestAnimationFrame(render); }; render(); })();
}
Safari 10.1 position: fixed - repaint bug - Script Codes
Safari 10.1 position: fixed - repaint bug - Script Codes
Home Page Home
Developer Peter Hrynkow
Username peterhry
Uploaded September 18, 2022
Rating 3
Size 2,746 Kb
Views 52,624
Do you need developer help for Safari 10.1 position: fixed - repaint bug?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Peter Hrynkow (peterhry) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!