Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

iOS scroll issue #43

Closed
Closed
@wamphlett

Description

@wamphlett

I am experiencing a strange scroll is on iOS. When focusing an input or the content size changes, the screen scrolls up out of view.

I've debugged this somewhat and I can see the issue is coming from the _onRef function. Specifically, y in measureInWindow returns about 700 meaning that the scroll calculation is always out. If I add a delay to the setTimeout, e.g.

setTimeout(() => {
            this._root._innerViewRef &&
            this._root._innerViewRef.measureInWindow((x, y) => {
                this._topOffset = y;
            });
        }, 1000);

then y becomes 25 and the scrolling works exactly as expected. Im not sure what the purpose of this _onRef function is and Im not confident that my solution is the best - feels hacky without knowing what this function is supposed to be doing.

Perhaps I am doing something wrong somewhere else but I feel like I have exhausted all attempts to resolve this now. Are you able to help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions