Skip to content

ion-item-sliding class active-options-left/right is not always applied leading into buttons not being rendered #11988

@masimplo

Description

@masimplo

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
Sliding ion-options sometimes does not show buttons but empty space. Sliding the item back and forth a bit shows the buttons.

screenshot 2017-06-09 10 17 51

Expected behavior:
Sliding ion-options should always display the buttons underneath.

screenshot 2017-06-09 10 18 10

Steps to reproduce:
My exact case is a virtual scroll list that renders custom components that wrap an ion-item-sliding but should be reproducible in simpler examples.
In a list rendering ion-item-sliding slide the item left or right in a slow device or using chrome dev tools CPU throttling (seems to be a race condition of some kind).
Some times buttons will appear, some times a white area will appear instead of the buttons until you
nudge the item again a bit.

When buttons appear DOM looks like
image

When buttons do not appear DOM looks like:
image

Notice that in the second case the class active-options-left is missing, although active-slide is present

Other information:
Have tested this in 3.1.0, 3.3.0 and latest nightly and consistently happens across all.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.3.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.3.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.3.0
    @ionic/cli-plugin-ionic-angular : 1.3.0
    Cordova Platforms               : android 6.2.3
    Ionic Framework                 : ionic-angular 3.3.0-201706052245

System:

    Node       : v7.10.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b
    ios-deploy : not installed
    ios-sim    : not installed

Note: a similar issue had been filed for an older version of Ionic but was closed due to lack of reporter feedback. I have commented both on the closed issue, but opened a new updated issue, so this doesn't fall between the cracks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions