Commit Graph
23 Commits
Author SHA1 Message Date
Brent Simmons e05b4fac6a Merge branch 'main' into make-web-views-inspectable 2026-11-22 20:49:41 -08:00
Dave Marquard abb71358b6 Use the system find bar for Find in Article on iOS
Find in Article was a custom search bar plus JavaScript that walked the
page text and drew its own highlights. It predates WKWebView's
UIFindInteraction (iOS 16), and its state lived in the page, so on iPad,
where the article view stays on screen and reuses its web view for the
next article, the bar kept the previous article's text and result count
and Next / Previous did nothing.

Turn on isFindInteractionEnabled and drive the web view's find
interaction instead. ArticleViewController handles find:, findNext: and
findPrevious:, so the system Find menu (Find, Find Next, Find Previous)
works with a hardware keyboard, and the old ⌘F key command goes away.
It also passes Use Selection for Find to the web view, which otherwise
only gets it while it's first responder, so the menu item works when the
view controller has focus. The find bar is dismissed when the article
changes or the article view goes away. The share sheet's Find in Article item still works.

Verified on iPad Pro 11-inch (iOS 27.0) and iPhone 18 Pro (iOS 27.2)
simulators: ⌘F, ⌘G, switching articles from the timeline and with the
next-article button, and the share sheet item.
2026-11-22 07:06:12 -08:00
Ivan Kuchin ea3ee6d0a5 make web views inspectable 2026-11-14 01:40:52 +01:00
Brent Simmons 9843bdb779 Rebuild web views on changing JavaScript-enabled setting. 2026-09-17 17:16:38 -07:00
Brent Simmons d7f1d1694c Keep the article web view alive while it's in element fullscreen, so deallocating it mid-transition can't trigger the WebKit crash in WebFullScreenManagerProxy. Fixes #5382. 2026-08-10 09:36:14 -07:00
Brent Simmons 833d06c076 Fix various concurrency issues. 2025-11-18 20:22:48 -08:00
Brent Simmons 9efde554d4 Clean whitespace-only lines. 2025-11-05 11:22:10 -08:00
Brent Simmons 5e39b569a7 Merged main to branch. 2025-11-01 15:53:33 -07:00
Brent Simmons 3cf3bc5763 Use shared WebViewConfiguration.configuration. Make sure allowsContentJavaScript is accessed on main thread. 2025-09-23 10:09:32 -07:00
Brent Simmons 4b7ea6d920 Mark classes as final when they can be, to communicate intent (don’t subclass these). Fix #4751. 2025-09-16 10:21:29 -07:00
Stuart Breckenridge cd31f676ce 📌 Apply #4323 js preferences to 7.0 2025-09-14 17:38:27 +08:00
Stuart Breckenridge 402fbd3da3 🩹 Amend #4323 JS pref changes cause reload only 2025-09-14 11:19:01 +08:00
Stuart Breckenridge b2e3ed7b92 Address #4323 Feedback
Note: the diff for Settings.storyboard is large, but it’s only to add a tableviewcell for the enableJS toggle.
2025-09-13 12:32:48 +08:00
Stuart Breckenridge 278994c86d Fixes #4323 adds option to disable js on iDevices 2025-09-11 22:19:35 +08:00
Brent Simmons ee9c14783f Revert webview changes that might be the cause of the no-scroll-on-coming-back-from-sleep bug. 2025-05-08 21:29:58 -07:00
Brent Simmons b7d4041781 Simplify WebView loading on iOS. 2025-04-28 21:00:31 -07:00
Brent Simmons 836d31875d Fix several warnings. 2024-12-07 14:52:38 -08:00
Brent Simmons 05ea769c12 Fix build errors. 2024-12-04 18:43:47 -08:00
Brent Simmons 279a99259e Use WKUserScript to inject scripts into the page. Use permalink as base URL. 2023-11-25 11:29:56 -08:00
Maurice Parker cf8dbb26f7 Resolve issue where we could have a web view deallocated before getting displayed. 2020-09-01 18:54:46 -05:00
Maurice Parker ccb813f6ec Allow autoplay on iOS 2020-05-10 12:21:35 -05:00
Maurice Parker 36841602a5 Change article rendering to use loadHTMLString instead of JavaScript. Issue #1923 2020-03-17 17:18:24 -05:00
Maurice Parker 5a5abb0b87 Ensure that the dom is fully loaded on *all* web views before being made available to process JavaScript. Issue #1756 & Issue #1808 2020-02-25 15:10:51 -08:00