Skip to content

White space below action bar on IOS #7065

Closed

Description

@brandon-sigao

Environment

  • CLI: 5.2.4
  • Cross-platform modules: 5.2.2
  • Android Runtime: 5.2.1
  • iOS Runtime: 5.2.0
  • Nativescript Angular

Describe the bug
On IOS, navigating to a page results in the page content not extending to the action bar and leaving a large gap of white space. User input such as a tap event will cause the page the redraw into the correct format without the white space.

To Reproduce
I honestly don't have a clue what specifically makes this bug occur. I suspect its related to recently upgrading to "tns-core-modules: 5.2.2" as we weren't having these issues a few weeks ago, but I could be wrong. The best I can give you is that it happens on initial page load and persists until you interact with the page, at which point the page will be formatted correctly.

If it helps, we are also using flat="true" on all of our action bars.

Additional context
An example can be found here.

EDIT 1
I'm in the process of switching back to 5.2.1 to confirm my suspicions. As a work around, adding "changeDetectorRef.detectChanges()" at the end of the ngOnInit function seems to fix the problem, but I'm hoping to find a solution that doesn't involve injecting that into every single page.

EDIT 2
We confirmed that the issue exists only on tns-core-modules v5.2.2, reverting back to 5.2.1 solves this.

Activity

  1. tsonevn commented on Mar 25, 2019

    @tsonevn
    Contributor

    Hi @brandon-sigao,
    I was able to recreate the case with flat="true" in a non-Angular project and will mark the issue as a bug that we will investigate further. I also checked the workaround with detectChanges() suggested in your comment in an NS Angular project, however, it does not seem to fix the issue on my side.
    Regarding that, as a temporary solution, I would suggest removing the flat property from the ActionBar.
    Archive.zip

  2. brandon-sigao commented on Mar 25, 2019

    @brandon-sigao
    Author

    @tsonevn Thanks for the update. We ended up sticking with 5.2.1 as there wasn't any real need to jump to 5.2.2 right now and 'flat="true"' is necessary for our app design to work.

  3. ghost removed on Apr 3, 2019
  4. codermannn commented on May 1, 2019

    @codermannn

    @tsonevn Thanks for the update. We ended up sticking with 5.2.1 as there wasn't any real need to jump to 5.2.2 right now and 'flat="true"' is necessary for our app design to work.

    But if you check the app in IOS versions 10/11 the data goes behind the action bar

  5. brandon-sigao commented on May 1, 2019

    @brandon-sigao
    Author

    We just updated everything to current versions, and as far as i can tell nothing has been fixed. We still get a giant white bar under the action bar until we interact with the page, and then it redraws properly. It does this on all Iphone emulators we've tried. It also seems to randomly choose to show a white bar at the bottom of the iPhone X instead of extending the top level element to the bottom.

    I'm going to be exploring workarounds, but otherwise we're just going to drop back down to 5.2.1.

    This also means that we're probably going to have to go into alpha with Iphone X safe areas not getting drawn because we were banking on this stuff being resolved in the newest version.

    EDIT: Installing on a physical device is 10 times worse. White space above and below the action bar. Intermittent white space all over the unsafe margins. The info bar which should have white icons (as per Nativescript documentation) is sometimes transparant and sometimes solid white. It seems to be entirely based on if we're using an action bar or not.

  6. codermannn commented on May 1, 2019

    @codermannn

    @brandon-sigao Did you try running your app on ios 10.* with 5.2.1? For me, after the downgrade,the white space is not seen on IOS 12.*, but the content in a ScrollView tucks behind the ActionBar for the older versions with 5.2.1.

  7. tsonevn commented on May 2, 2019

    @tsonevn
    Contributor

    HI all,
    Currently, the fix for this issue is available in tns-core-modules@rc. You can add rc modules as follows:

    1. tns plugin remove tns-core-modules
    2. tns plugin add tns-core-modules@rc
    3. delete node_modules, platforms, hooks folders and package-lock.json file
    4. rebuild the project

    We will soon release a new patch of the modules with the fix. I will write you back as soon as the patch is available

  8. codermannn commented on May 2, 2019

    @codermannn

    HI all,
    Currently, the fix for this issue is available in tns-core-modules@rc. You can add rc modules as follows:

    1. tns plugin remove tns-core-modules
    2. tns plugin add tns-core-modules@rc
    3. delete node_modules, platforms, hooks folders and package-lock.json file
    4. rebuild the project

    We will soon release a new patch of the modules with the fix. I will write you back as soon as the patch is available

    image

    Still the same issue with "tns-core-modules": "^5.3.1-rc-2019-04-15-173231-01"

  9. tsonevn commented on May 3, 2019

    @tsonevn
    Contributor

    @lohiarahul, Can you send us the project that you are using for testing?

  10. lock commented on May 5, 2020

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  11. locked and limited conversation to collaborators on May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions