From f93f778cb2d71a82f0e51d9f56724670b6e1ea79 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 10 Jul 2023 21:42:35 -0700 Subject: [PATCH] Fix not being able to swipe back from read view --- Reader/Screens/Read/ReadViewController.swift | 3 +++ Reader/read.css | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Reader/Screens/Read/ReadViewController.swift b/Reader/Screens/Read/ReadViewController.swift index 30aff00..a4e7afe 100644 --- a/Reader/Screens/Read/ReadViewController.swift +++ b/Reader/Screens/Read/ReadViewController.swift @@ -73,6 +73,9 @@ class ReadViewController: UIViewController { // transparent background required to prevent white flash in dark mode, just using .appBackground doesn't work webView.isOpaque = false webView.backgroundColor = .clear + if #available(iOS 16.4, *) { + webView.isInspectable = true + } if #available(iOS 16.0, *) { webView.isFindInteractionEnabled = true } diff --git a/Reader/read.css b/Reader/read.css index 732301c..a347c1f 100644 --- a/Reader/read.css +++ b/Reader/read.css @@ -9,6 +9,11 @@ --dark-background-color: rgb(25, 25, 25); /* .appBackground */ } +/* we want to prevent anything from horizontally overflowing its container */ +* { + max-width: 100%; +} + body { margin: 12px; font-family: ui-serif; @@ -27,10 +32,6 @@ a { color: var(--tint-color); } -img { - max-width: 100%; -} - figure { margin: 0; }