Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fab buttons will be displayed under the ion-item-divider when not sticky #8489

Closed
alan-agius4 opened this issue Oct 4, 2016 · 17 comments
Closed
Assignees
Milestone

Comments

@alan-agius4
Copy link
Contributor

alan-agius4 commented Oct 4, 2016

Fab buttons will be displayed under the ion-item-divider when not sticky, As ion-item-divider has a z-index even when not sticky

Short description of the problem:

z-index is applied on ion-item-divider when might not be needed when it's not sticky

What behavior are you expecting?

No z-index applied and Fab button to be displayed on top of the ion-item-divider

screen shot 2016-10-04 at 23 59 30

Ionic 2.

@manucorporat
Copy link
Contributor

@alan-agius4 what issue is causing to have z-index in non-sticky item dividers?

@alan-agius4
Copy link
Contributor Author

alan-agius4 commented Oct 4, 2016

Apologies, updated previous comment.

Actually, now that I am having a look at it again. I am not sure if the fab should show over the divider even when sticky

@alan-agius4 alan-agius4 changed the title ion-item-divider z-index when not sticky Fab buttons will be displayed under the ion-item-divider when not sticky Oct 4, 2016
@manucorporat
Copy link
Contributor

ok, looks like this is a real issue! the screenshot really made the difference, I understand perfectly what is going on.

Actually, now that I am having a look at it again. I am not sure if the fab should show over the divider even when sticky

yes, the fab should show over a sticky divider as well

@manucorporat manucorporat added the v2 label Oct 4, 2016
@manucorporat manucorporat added this to the 2.0.0-rc.1 milestone Oct 4, 2016
@manucorporat manucorporat self-assigned this Oct 4, 2016
@manucorporat
Copy link
Contributor

can you share the markup?

@alan-agius4
Copy link
Contributor Author

alan-agius4 commented Oct 5, 2016

z-index of the fab is 100, while the one of the divider is 1000.

Markup to replicate below

<ion-content>
    <ion-fab>
        <button ion-fab>Button</button>
    </ion-fab>

    <ion-item-group>
        <ion-item-divider>Games</ion-item-divider>

        <ion-item>Pokémon Yellow</ion-item>
        <ion-item>Super Metroid</ion-item>
        <ion-item>Mega Man X</ion-item>
    </ion-item-group>
</ion-content>

@manucorporat
Copy link
Contributor

<ion-item-group> should be inside <ion-list>. is that right @brandyscarney ?

@alan-agius4
Copy link
Contributor Author

alan-agius4 commented Oct 5, 2016

Not as per documention

"To divide groups of items, use <ion-item-group> instead of <ion-list>. Use <ion-item-divider> components to divide the group in to multiple sections:"
http://ionicframework.com/docs/v2/components/#list-dividers

@manucorporat
Copy link
Contributor

@alan-agius4 so here's the thing. I understand the issue, but I can't reproduce it!! it works ok in my machine surprisingly.

screen shot 2016-10-05 at 18 20 49

@alan-agius4
Copy link
Contributor Author

Thats odd, you are using RC 0? And same markup?

On Wednesday, 5 October 2016, Manu Mtz.-Almeida [email protected]
wrote:

@alan-agius4 https://github.com/alan-agius4 so here's the thing. I
understand the issue, but I can't reproduce it!! it works ok in my machine
surprisingly.

[image: screen shot 2016-10-05 at 18 20 49]
https://cloud.githubusercontent.com/assets/127379/19121901/7a82490a-8b28-11e6-85fe-e727b084d575.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8489 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQv-WmxR38qcEDh9LbGKPHgVK_JN7JHiks5qw86sgaJpZM4KOK_L
.

@manucorporat
Copy link
Contributor

manucorporat commented Oct 5, 2016

yes, RC0

<ion-header>
  <ion-toolbar>
    <ion-title>Floating Action Buttons</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
    <ion-fab>
        <button ion-fab>Button</button>
    </ion-fab>

    <ion-item-group>
        <ion-item-divider>Games</ion-item-divider>

        <ion-item>Pokémon Yellow</ion-item>
        <ion-item>Super Metroid</ion-item>
        <ion-item>Mega Man X</ion-item>
    </ion-item-group>
</ion-content>

screen shot 2016-10-05 at 18 36 47

@alan-agius4
Copy link
Contributor Author

Seems like you managed to replicate it now :)

On Wednesday, 5 October 2016, Manu Mtz.-Almeida [email protected]
wrote:

Floating Action Buttons Button
<ion-item-group>
    <ion-item-divider sticky>Games</ion-item-divider>

    <ion-item>Pokémon Yellow</ion-item>
    <ion-item>Super Metroid</ion-item>
    <ion-item>Mega Man X</ion-item>
</ion-item-group>

[image: screen shot 2016-10-05 at 18 36 47]
https://cloud.githubusercontent.com/assets/127379/19122434/c63b4a5c-8b2a-11e6-8c15-0aaaa4cd9e25.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8489 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQv-WifbPd1qaO3nh4MF2vezNbCxwrhYks5qw9KDgaJpZM4KOK_L
.

@manucorporat
Copy link
Contributor

@alan-agius4 I don't think so... the fab button is over the divider

@alan-agius4
Copy link
Contributor Author

Right, well, i dont know :/ why i am having that issue than.

On Wednesday, 5 October 2016, Manu Mtz.-Almeida [email protected]
wrote:

@alan-agius4 https://github.com/alan-agius4 I don't think so... the fab
button is over the divider


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8489 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQv-WlBvYHJN2gUvY0KCyg5_NuavxJjdks5qw9PzgaJpZM4KOK_L
.

@manucorporat
Copy link
Contributor

manucorporat commented Oct 5, 2016

@alan-agius4 We are both missing something for sure haha!

  • can you create a repo that reproduces the issue? or at least the whole markup?
  • are you using tabs?
  • is the fab ALWAYS under the divider?
  • are there some kind of artifacts when clicking the fab, or when the page is transitioning?
  • any custom css applied to fab/content/list/divider?

@alan-agius4
Copy link
Contributor Author

alan-agius4 commented Oct 5, 2016

Found the issue :), I have the ion-fab button inside a custom component.
For this case I wrapped it inside a "div" to mimic the issue.

Repo:
https://github.com/alan-agius4/ionic-playground

File:
https://github.com/alan-agius4/ionic-playground/blob/master/src/pages/hello-ionic/hello-ionic.html

Also, even something like the below will cause the issue

<template [ngIf]="1 === 1">
    <ion-fab>
      <button ion-fab>Button</button>
    </ion-fab>
  </template>

@manucorporat
Copy link
Contributor

fixed! 14e668c

I didn't merge your PR since it didn't fix the root of the problem, but thank you anyway, your help resolving this issue has been amazing!

@alan-agius4
Copy link
Contributor Author

cool :)

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants