You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "MatrixNeoKozak (via GitHub)" <gi...@apache.org> on 2026/08/24 12:56:02 UTC
[PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
MatrixNeoKozak opened a new pull request, #1695:
URL: https://github.com/apache/cordova-ios/pull/1695
## What
The built-in status bar view (which paints StatusBarBackgroundColor from config.xml) was created with `hidden = YES`, and its `hidden` flag was only ever updated by the `scrollViewDidChangeAdjustedContentInset:` delegate callback. `showStatusBar:` (the `window.statusbar.visible` / `StatusBarInternal.setVisible` path) only toggled the view's `alpha`, so when the scroll-view delegate callback does not fire the status bar view stays hidden regardless of the JS API or config.xml, making the status bar appear unresponsive (apache/cordova-ios#1693, broken on iOS 27). This change creates the status bar view visible and makes `showStatusBar:` drive `hidden` together with `alpha`, keeping the two visibility controls coherent, and adds a regression test asserting the view's `hidden`/`alpha` and `prefersStatusBarHidden` state after both show and hide calls.
## Why
This change resolves the target issue or improvement.
## How to test
Verify that the project builds/runs correctly and the specific bug/improvement is addressed.
Fixes #1693
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422251233
> WebKit internally sets the content inset on the scroll view: https://github.com/WebKit/WebKit/blob/4087ab818e4949f1d63a8c4c54fd08369b48f420/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm#L3735
>
> That method gets called unconditionally as part of setting up the scroll and content views: https://github.com/WebKit/WebKit/blob/4087ab818e4949f1d63a8c4c54fd08369b48f420/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm#L244
So you mean when the WebView gets initialized it should always call scrollViewDidChangeAdjustedContentInset:?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "MatrixNeoKozak (via GitHub)" <gi...@apache.org>.
MatrixNeoKozak closed pull request #1695: fix(statusbar): keep built-in status bar view visibility in sync with the JS API
URL: https://github.com/apache/cordova-ios/pull/1695
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5397516331
## [Codecov](https://app.codecov.io/gh/apache/cordova-ios/pull/1695?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 80.02%. Comparing base ([`21eebe9`](https://app.codecov.io/gh/apache/cordova-ios/commit/21eebe98f3e03a8ba62fdc6203e9de130a301fa4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`92a31a6`](https://app.codecov.io/gh/apache/cordova-ios/commit/92a31a6f94f68504986c90491d8c40c92e43dd03?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #1695 +/- ##
==========================================
- Coverage 81.76% 80.02% -1.75%
==========================================
Files 17 17
Lines 5161 5161
==========================================
- Hits 4220 4130 -90
- Misses 941 1031 +90
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cordova-ios/pull/1695?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5419439213
> when the scroll-view delegate callback does not fire the status bar view stays hidden
Under what conditions does `scrollViewDidChangeAdjustedContentInset:` not fire?
WebKit internally sets the content inset on the scroll view: https://github.com/WebKit/WebKit/blob/4087ab818e4949f1d63a8c4c54fd08369b48f420/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm#L3735
That method gets called unconditionally as part of setting up the scroll and content views: https://github.com/WebKit/WebKit/blob/4087ab818e4949f1d63a8c4c54fd08369b48f420/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm#L244
It's also called again any time the `viewport-fit` meta directive is changed:
https://github.com/WebKit/WebKit/blob/4087ab818e4949f1d63a8c4c54fd08369b48f420/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm#L3757
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422640902
Ok I will make some improvements to the code, this is very confusing. I added more documentation to `scrollViewDidChangeAdjustedContentInset:` on PR #1699 and will rename `statusBar` to `statusBarBackground` on `CDVViewController`, since this is just the background and not the real status bar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5397666326
I documented the Mac Catalyst behaviour for the status bar on PR #1696
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "xavierserrai (via GitHub)" <gi...@apache.org>.
xavierserrai commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5410672626
Dear @GitToTheHub,
Thanks for the clarification. However, I have not been able to find that in the documentation, only in changelogs.
Thanks,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422990024
I think the code should be improved for `prefersStatusBarHidden` and `showStatusBar:`.
`statusBar.alpha` will only be changed if `showStatusBar:` will be called:
https://github.com/apache/cordova-ios/blob/f525ec9ec8b434f79928c66dff2bca06e178066d/CordovaLib/Classes/Public/CDVViewController.m#L896-L902
First improvement: `statusBar.hidden` should be set here accordingly.
Since calling `showStatusBar:` is the only place where `statusBar.alpha` could be set to `1` or `0`, which is only to make the real status bar appear or disappear by `prefersStatusBarHidden`, it would be better to add a property named `statusBarHidden` which is for hidding/showing the real status bar. I renamed `statusBar` to `statusBarBackground` in PR #1700 to make a better distinction between the real status bar and our own background. Using `statusBar.alpha` by hidding/showing the real status bar seems for me misleading as for e.g. the real status bar would be shown when `self.statusBar.alpha` is `1.000000` but `self.statusBar.hidden` is `YES`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5423110764
I was just thinking that a `statusBarContentHidden` bool would probably make more sense. I can make a PR to implement that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5423171652
Since `statusBar` is called now `statusBarBackground` I would say that `statusBarHidden` is sufficient now. The method for hidding/showing the real status bar is called `prefersStatusBarHidden` and not `prefersStatusBarContentHidden`. Why you would prefer `statusBarContentHidden`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5407459304
@xavierserrai
> As commented here:
>
> https://github.com/apache/cordova-ios/issues/1692#issuecomment-5398204841
>
> Those old tags from config.xml seem to be outdated.
The preference `StatusBarBackgroundColor` is still supported by cordova-ios 8.x.
It's only that `StatusBarOverLaysWebView` is not supported.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "xavierserrai (via GitHub)" <gi...@apache.org>.
xavierserrai commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5396295973
Dear @MatrixNeoKozak ,
I have tested the cordova-ios 8.1.1 platform with your fix and js api works properly:
```````
window.statusbar.setBackgroundColor('#FF0000');
```````
Sets the status bar to red color.
However, the configuration in config.xml:
```````
<preference name="StatusBarOverLaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#FF0000" />
```````
Is not working properly. At app startup, for one moment it appears a red background statusbar, but it disappears suddently leaving a statusbar with a gradient background.
Also, the statusbar in both cases overlays the webview.
For the overlay statusbar issue it was solved in [cordova-plugin-statusbar](https://github.com/apache/cordova-plugin-statusbar) using this code:
```````
CGRect statusBarFrame = CGRectZero;
if (@available(iOS 13.0, *)) {
UIWindowScene *windowScene = self.viewController.view.window.windowScene;
statusBarFrame = windowScene.statusBarManager.statusBarFrame;
}
````````
Thanks,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422080700
@dpogue Thanks for the explanation. The author wrote about Status Bar JS API `window.statusbar.visible`. Maybe this will not change any insets?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422183556
> window.statusbar.visible makes the status bar content and background visible or invisible, it does not impact the safe area insets at all
Correct but the status bar is set initially to `self.statusBar.hidden = YES;` and when `showStatusBar:` is called, it will only change the alpha, not the hidden state:
https://github.com/apache/cordova-ios/blob/f525ec9ec8b434f79928c66dff2bca06e178066d/CordovaLib/Classes/Public/CDVViewController.m#L896-L902
So the hidden state only depends on when `scrollViewDidChangeAdjustedContentInset:` is called.
Anyway why is the alpha changed on the status bar? Would it be not enough to just hide it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "MatrixNeoKozak (via GitHub)" <gi...@apache.org>.
MatrixNeoKozak commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5406721719
Thanks for testing! The config.xml background color flash and overlay behavior sound like a separate issue from what #1693 covers (the JS API visibility sync) — want me to open a follow-up issue for those, referencing the statusBarManager.statusBarFrame approach from cordova-plugin-statusbar you mentioned?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "MatrixNeoKozak (via GitHub)" <gi...@apache.org>.
MatrixNeoKozak commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-6142155953
This PR has been superseded by upstream #1701 (commit 3b3c7578), which implements the same synchronization of the built-in status bar with the JS API through a dedicated `_statusBarHidden` flag:
- `showStatusBar:` now updates `_statusBarHidden` and re-runs `scrollViewDidChangeAdjustedContentInset:`, so `statusBarBackgroundView.hidden` stays in sync even if the delegate callback ordering is unexpected;
- `prefersStatusBarHidden` returns the flag instead of the `alpha < 0.0001` heuristic;
- regression tests were added in `CDVStatusBarTests.m`.
Regarding @GitToTheHub's concern about `viewport-fit=cover`: the upstream implementation hides the background view whenever `contentInsetAdjustmentBehavior == Never` (i.e. cover mode) or `visible == false`, and keeps `hidden = YES` on creation — so the cover case stays hidden.
Closing in favour of the upstream fix. Thanks @GitToTheHub and @dpogue for the detailed discussion that shaped it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "xavierserrai (via GitHub)" <gi...@apache.org>.
xavierserrai commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5406959004
Dear @MatrixNeoKozak ,
As commented here:
https://github.com/apache/cordova-ios/issues/1692#issuecomment-5398204841
Those old tags from config.xml seem to be outdated.
Thanks,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5423208443
Ok than you can make a PR for it :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5423189440
yeah, `statusBarHidden` is probably fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-6143360551
You're welcome 🙂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on code in PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#discussion_r3850789507
##########
CordovaLib/Classes/Public/CDVViewController.m:
##########
@@ -746,8 +746,6 @@ - (void)createStatusBarView
[self.statusBar.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor].active = YES;
[self.statusBar.topAnchor constraintEqualToAnchor:self.view.topAnchor].active = YES;
[self.statusBar.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor].active = YES;
-
- self.statusBar.hidden = YES;
Review Comment:
I see you removed the line which initially hides the status bar. Did you test, if this has no regressions? For e.g. the status bar should be not visible when `viewport-fit=cover` is set.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5419363749
> I think it's a little bit wrong to hide/show the status bar in `scrollViewDidChangeAdjustedContentInset:` depending on `scrollView.contentInsetAdjustmentBehavior == UIScrollViewContentInsetAdjustmentNever`.
This is how we detect changes to `viewport-fit`:
`viewport-fit=cover` causes the `contentInsetAdjustmentBehavior` to be `UIScrollViewContentInsetAdjustmentNever`
<small>(because WebKit still doesn't expose `_webView:didChangeSafeAreaShouldAffectObscuredInsets:` as public API, so we need to react based on the scrollView delegate)</small>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5411352279
I know, the documentation is currently not the best, but I try to improve it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422128662
`window.statusbar.visible` makes the status bar content and background visible or invisible, it does not impact the safe area insets at all
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(statusbar): keep built-in status bar view visibility in sync with the JS API [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1695:
URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422286810
> Anyway why is the alpha changed on the status bar? Would it be not enough to just hide it?
We detect if the alpha is 0 and use that as the flag to hide the status bar content: https://github.com/apache/cordova-ios/blob/f525ec9ec8b434f79928c66dff2bca06e178066d/CordovaLib/Classes/Public/CDVViewController.m#L597-L602
We can't rely on `visible` because `visible` is false when `viewport-fit=cover` but the status bar **content** should still be shown (just not the background)
> So you mean when the WebView gets initialized it should always call scrollViewDidChangeAdjustedContentInset:?
According to the WebKit source code, yes.
If someone can put together a test case where that's not happening, I'd love to investigate.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org