Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8583
Description
The core
SystemBarsplugin never forwards the native status bar tap to the web view, sowindownever receivesstatusTap(used by Ionic for scroll-to-top) once an app migrates from@capacitor/status-bartoSystemBars. Capacitor iOS already detects the tap and postsNotification.Name.capacitorStatusBarTapped; nothing in core was listening.SystemBarsnow observes that notification inload()and callsbridge.triggerJSEvent(eventName: "statusTap", target: "window"), the same call@capacitor/status-barmakes. If theStatusBarplugin is also registered,SystemBarsskips the event so the page still gets exactly onestatusTapper tap. The observer is removed indeinit.Change Type
Rationale / Problems Fixed
Restores the established
statusTapbehaviour for apps that only use the coreSystemBarsAPI, so they don't need to keep@capacitor/status-barinstalled just for this event (#8583).Tests or Reproductions
Stock app from
npm init @capacitor/appwith@capacitor/iosvia CocoaPods (so the patched source is compiled), awindowstatusTaplistener that logs each event on screen, and a tall scrollable page. Simulator: iPhone 17, iOS 26.5. 3 status bar taps per run:@capacitor/ios8.6.2 from npm, no@capacitor/status-bar: 0statusTapevents (the page does scroll to top, so the taps reach iOS)@capacitor/status-bar: 3 events, one per tap@capacitor/status-bar8: 3 events, one per tap (no duplicates)npm run swiftlint -- lint: no findings inSystemBars.swift;npm run verify(inios/) passesScreenshots / Media
N/A
Platforms Affected
Notes / Comments
While testing on iOS 26.5 I noticed that status bar taps only reach Capacitor's
handleTapAction:hook when the web content is scrollable; with a short, non-scrolling page neither this change nor@capacitor/status-barreceives the tap. That is existing iOS/Capacitor behaviour and not changed here, but worth knowing when reproducing.The
StatusBarcheck is done at tap time rather than inload(), so it doesn't depend on plugin load order.