Skip to content

bug: IOS ion-select initialised off-screen, first time a value is selected the value is not rendered until something changes in page. #18843

Closed

Description

@cparkinsonMYCM

Bug Report

Ionic version:
[x] 4.x

Current behavior:
This could very well be due to Apple's implementation of their WebView but it's only the ion-select elements I've noticed it on.

on iOS, found on device and in simulator on OSX;
If a page is taller than the height of the device screen and an ion-select element is positioned off-screen, below the bottom, when scrolling to the item and selecting an option for the first time (e.g. changing from empty or no value to a value) the chosen value can be seen briefly and is then not rendered.
If any styling or content is changed that causes the value to be redrawn (presumably), such as;

  • scrolling up, so the element is off-screen, then scrolling back down to bring it into view.
  • choosing a different value in the same ion-select
  • choosing a value in another select (not sure what this changes to affect the initial ion-select)
    Then the value is rendered.

Steps to reproduce:

  • build a page with a height taller than the device screen height, and position an ion-select such that you must scroll to bring it into view from its initial position.
  • Select an option for that ion-select
  • See the value be set then disappear
  • Edit the same ion-select to a different option, or scroll it out of view and back into view.
  • See the value now being rendered correctly.

Other information:
Using safari's inspector to view the elements as they change shows nothing to be wrong, and something as simple as scrolling the ion-select element out and back into view will cause it to be redrawn which suggests it may be down to the WebView and/or an order of operations on updating elements and styles.

Ionic info:

Ionic:

   Ionic CLI                     : 5.2.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.5.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Capacitor:

   Capacitor CLI   : 1.0.0
   @capacitor/core : 1.0.0

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 8 other plugins)

Utility:

   cordova-res : 0.5.1 (update available: 0.6.0)
   native-run  : 0.2.7 (update available: 0.2.8)

System:

   ios-deploy : 1.9.4
   ios-sim    : 8.0.1
   NodeJS     : v12.5.0 (/usr/local/bin/node)
   npm        : 6.10.1
   OS         : macOS Mojave
   Xcode      : Xcode 10.2.1 Build version 10E1001

(Capacitor is there, but I'm not making use of it...)

Activity

  1. cparkinsonMYCM commented on Jul 30, 2019

    @cparkinsonMYCM
    Author

    It seems that ion-datetime also have this issue.
    Not displaying their value when set, until something else updates to affect them.
    But only if they are positioned off-screen on init of the page.

  2. added a commit that references this issue on Aug 27, 2019
    48a2763
  3. added a commit that references this issue on Aug 27, 2019
    7eb1089
  4. added a commit that references this issue on Aug 27, 2019
    69ee964
  5. cparkinsonMYCM commented on Aug 28, 2019

    @cparkinsonMYCM
    Author

    So, I see that this issue was closed by @manucorporat 's pull request being merged 19 hours ago, and release 4.8.1 was put out an hour or so after that.

    Does 4.8.1 contain these changes?
    I assume not, because if so the issue is not fixed.

    Or are we looking at it being in the next release?

  6. cparkinsonMYCM commented on Aug 28, 2019

    @cparkinsonMYCM
    Author

    If it helps I have recorded it happening via Simulator on OSX, file is a .mov in the zip archive.
    ion-select offscreen init.mov.zip

  7. liamdebeasi commented on Aug 28, 2019

    @liamdebeasi
    Contributor

    4.8.1 does not contain these changes. These fixes will be available in the next stable release of Ionic. Thanks!

  8. cparkinsonMYCM commented on Aug 28, 2019

    @cparkinsonMYCM
    Author

    Ah, okay.
    No worries.

    The closing of the issue had me confused.

  9. cparkinsonMYCM commented on Sep 5, 2019

    @cparkinsonMYCM
    Author

    Does 4.9.0 count as a stable release?

  10. liamdebeasi commented on Sep 5, 2019

    @liamdebeasi
    Contributor

    @cparkinsonMYCM Yes, 4.9.0 is the latest stable release.

  11. cparkinsonMYCM commented on Sep 5, 2019

    @cparkinsonMYCM
    Author

    That's a little upsetting then, as the issue is still not resolved :(

  12. liamdebeasi commented on Sep 5, 2019

    @liamdebeasi
    Contributor

    Are you able to provide a code reproduction of the issue? I can take another look.

  13. ionitron-bot commented on Oct 5, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions