NativeScript / NativeScript/NativeScript

Scroll View safe area turned on by default change

Open
#10,290 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug-pending-triage
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.