diff --git a/flutter_readium/CHANGELOG.md b/flutter_readium/CHANGELOG.md index ad3b37e61..1752028b4 100644 --- a/flutter_readium/CHANGELOG.md +++ b/flutter_readium/CHANGELOG.md @@ -7,6 +7,12 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed +- **iOS reader views mounted after `audioEnable` never applied the media-overlay + column-break CSS.** The MO-active flag lives on the reader view, so a view created + after audio was enabled started with it off and word highlighting could be split + across CSS columns for the rest of the session. The flag is now seeded from the live + navigator when a reader view registers, matching Android, where it lives on the + shared reader. - **Guided-navigation playback reported later reading-order positions on iOS and web.** Those platforms converted the matched reading-order index twice, so the second item was emitted as position 3. Locators now apply Readium's 1-based position convention exactly once. diff --git a/flutter_readium/ios/flutter_readium/Sources/flutter_readium/FlutterReadiumPlugin.swift b/flutter_readium/ios/flutter_readium/Sources/flutter_readium/FlutterReadiumPlugin.swift index 6ca8b1671..aed41d06e 100644 --- a/flutter_readium/ios/flutter_readium/Sources/flutter_readium/FlutterReadiumPlugin.swift +++ b/flutter_readium/ios/flutter_readium/Sources/flutter_readium/FlutterReadiumPlugin.swift @@ -119,6 +119,9 @@ public class FlutterReadiumPlugin: NSObject, FlutterPlugin, ReadiumShared.Warnin internal func registerAsCurrentReaderView(_ readerView: any ReadiumReaderView) { let old = currentReaderView currentReaderView = readerView + // `audioEnable` sets MO-active through an optional-chained `currentReaderView?`, + // so a view registering later must pick the flag up from the navigator itself. + readerView.setMOActive(timebasedNavigator is FlutterMediaOverlayNavigator) _ = old // released here, safely outside the write }