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

ion-refresher causes inner-scroll to form a stacking context #17949

Closed
ETXIN opened this issue Apr 4, 2019 · 11 comments
Closed

ion-refresher causes inner-scroll to form a stacking context #17949

ETXIN opened this issue Apr 4, 2019 · 11 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report
Milestone

Comments

@ETXIN
Copy link

ETXIN commented Apr 4, 2019

Bug Report

Ionic version:
[x] 4.x

Current behavior:
When I trigger a pulldown refresh, ionic adds 'transform' to '.inner-scroll', which is correct. But when I finish the pull-down refresh, 'transform' is not removed, which leads to the formation of stacking content.

Expected behavior:
No stacking context.
Remove 'transform' at the end.

Steps to reproduce:
default
default
pulling
pulling
end
end

Related code:

<ion-content>
  <ion-refresher slot="fixed">
    <ion-refresher-content></ion-refresher-content>
  </ion-refresher>
</ion-content>

Other information:
Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.12.0
   Ionic Framework               : @ionic/angular 4.2.0
   @angular-devkit/build-angular : 0.13.6
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.6
   @ionic/angular-toolkit        : 1.4.1

System:

   NodeJS : v10.13.0
   npm    : 6.4.1
   OS     : Windows 10

@ionitron-bot ionitron-bot bot added the triage label Apr 4, 2019
@liamdebeasi
Copy link
Contributor

Hi there,

Thanks for the issue! Are you able to provide an example of the "stacking content" you described?

Thanks!

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Apr 4, 2019
@ionitron-bot ionitron-bot bot added triage and removed triage needs: reply the issue needs a response from the user labels Apr 4, 2019
@ETXIN
Copy link
Author

ETXIN commented Apr 5, 2019

@liamdebeasi Thanks for your response.

As long as the "transform: translateZ(0px)" is removed after the pulldown, it can be restored. #stacking-content

Current:
https://github.com/ionic-team/ionic/blob/48814ab134cfc5d8c54895e3a648d5dc8ef8ec28/core/src/components/refresher/refresher.tsx#L341

Expected:

style.transform = ((y > 0) ? `translateY(${y}px) translateZ(0px)` : null);

example

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Apr 10, 2019

Hi there,

Thanks for the follow up. What you described makes sense. Is having the translate remain causing any issues with the framework, or is it more of a "best practice" to remove it?

Thanks!

@ETXIN
Copy link
Author

ETXIN commented Apr 11, 2019

However, by default, 'translateZ(0px)' does not exist, so it should be removed when the pulldown is triggered.
I'm not sure if 'stacking content' will cause more problems, but it won't be a problem if you don't create it, right?

@asgeo1
Copy link

asgeo1 commented Apr 17, 2019

Hi there,

I'm having a similar issue with the refresher. I have a DOM element that is positioned fixed at the bottom of my ion-content.

The problem is that the left-over translateZ causes this fixed position element to no longer be positioned correctly. (some quirk of CSS, I don't fully get why...)

If I remove the translateZ then it positions correctly again.

This could the what the EXTIN is describing as "stacking content", not 100% sure.

Anyway, I agree, it would be better to remove translateZ once the refresher is finished. If it's not there before the refresh starts, why keep it around when it's done? Seems inconsistent to me and is causing these display issues.

cheers
-adam

@jmoren
Copy link

jmoren commented Jul 25, 2019

Hi there,

Thanks for the follow up. What you described makes sense. Is having the translate remain causing any issues with the framework, or is it more of a "best practice" to remove it?

Thanks!

I am having the same issue. I have a fixed box at the bottom of the ion-content, but after refreshing (using ion-refresher), the box is not fixed any more.
Removing the transform: translateZ(0px); fixes it.
The solution I have tested is

style.transform = ((y > 0) ? `translateY(${y}px) translateZ(0px)` : 'unset');

@mohsini172
Copy link

I'm also having the issue with transform: translateZ(0). Please remove it if there's no reason for it.

@logitimate
Copy link

Any update on this? We are still seeing this. We've implemented a work around for now but it makes the page jump as we have to wait for the refresher to finish before we remove the transform property.

@elvisgraho
Copy link
Contributor

Up! Having problems with fixed elements, because of the 'translateZ(0px)'. It is such an easy fix. Why hasn't it been fixed for a year?

@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report and removed needs: investigation labels Feb 26, 2020
@liamdebeasi liamdebeasi added this to the 5.0.2 milestone Feb 26, 2020
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #20621 and will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Mar 27, 2020

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 27, 2020
peixin pushed a commit to wisdom-garden/ionic that referenced this issue Jun 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

7 participants