NativeScript / NativeScript/NativeScript
Scroll View safe area turned on by default change
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.7k
- Forks
- 1.7k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 35
Description
Issue Description
When creating a nested scrollview within a scrollview, with the parent scrolling horizontally and the child scrolling vertically, when a sort is called, the cells in the columns out of view are incorrectly aligned and there can be graphical glitches. This is because ios overflow safe area is enabled. When it is disabled, the problem is resolved by adding the following code to ui -> scroll-view -> index.ios.js in the if condition on line 58 in the function attachNative(), placing it after this.nativeViewProtected.delegate = this._delegate;->
// Disable the iosOverflowSafeAreaEnabled property
this.nativeViewProtected.iosOverflowSafeAreaEnabled = false;
Reproduction
Create a ScrollView with a child Scrollview. The parent will scroll horizontally, and the child scrolls vertically. When a sort is called, the ScrollViews rerender. The parts of the layout out of view when sorted with have layout issues if iosOverflowSafeAreaEnabled is turned on by default.
Relevant log output (if applicable)
No response
Environment
No response
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ui/scroll-view/index.ios.js at attachNative(), especially the delegate assignment around line 58. Reproduce the nested horizontal-parent and vertical-child ScrollView case, including sorting, and compare behavior with iosOverflowSafeAreaEnabled disabled. Done means the out-of-view cells remain correctly aligned without graphical glitches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100