My research shows:
Since the issue is specific to iOS (Safari and Chrome on iPad) and works correctly on desktop browsers, the problem is almost certainly related to WebKit rendering quirks or device-specific behavior. By systematically debugging, you should be able to identify and resolve the issue. If the problem persists, consider filing a bug report with WebKit, providing a minimal reproducible example.
I created
Code:
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Display: None Test</title>
<style>
.hidden { display: none; }
</style>
</head>
<body>
<div class="hidden">This should be hidden.</div>
</body>
</html>
as iPhoneTest.html and ran it on both the desktop and iPhone. It successfully hid the text on both.
I will look further into the CSS to make sure there's no display: block applied to the same rule.
I am not familiar with javascript to investigate whether there is a style.display = 'block' messing with it.
All options appreciated.
Bookmarks