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

bug: refresher not visible when content has fullscreen attribute #18714

Closed
biesbjerg opened this issue Jul 4, 2019 · 12 comments · Fixed by #29608 · May be fixed by gramirez-vic/prueba1_alcaldia#3
Closed

bug: refresher not visible when content has fullscreen attribute #18714

biesbjerg opened this issue Jul 4, 2019 · 12 comments · Fixed by #29608 · May be fixed by gramirez-vic/prueba1_alcaldia#3
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@biesbjerg
Copy link

Bug Report

Ionic version:

[x] 4.x

Current behavior:
ion-refresher is not visible when content has fullscreen attribute.

Expected behavior:
ion-refresher should be visible when dragging content down, even if content has a fullscreen attribute.

Steps to reproduce:

<ion-content fullscreen>
	<ion-refresher>
		<ion-refresher-content></ion-refresher-content>
	</ion-refresher>
	<ion-list>
		<ion-item>
			<ion-label>Pokémon Yellow</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>Mega Man X</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>The Legend of Zelda</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>Pac-Man</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>Super Mario World</ion-label>
		</ion-item>
	</ion-list>
</ion-content>

Related code:
It seems to be some kind of z-index issue, since adding a higher value shows the refresher:

<ion-content fullscreen>
	<ion-refresher style="z-index: 999">
		<ion-refresher-content></ion-refresher-content>
	</ion-refresher>
	<ion-list>
		<ion-item>
			<ion-label>Pokémon Yellow</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>Mega Man X</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>The Legend of Zelda</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>Pac-Man</ion-label>
		</ion-item>
		<ion-item>
			<ion-label>Super Mario World</ion-label>
		</ion-item>
	</ion-list>
</ion-content>

Other information:

Related issues:
#10490
ionic-team/ionic-v3#256

Ionic info:

Ionic:

   Ionic CLI                     : 5.2.1 (/Users/kim/.npm-global/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.6.1-dev.201907031812.d71c1cd
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

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

Utility:

   cordova-res : 0.5.2
   native-run  : 0.2.7

System:

   Android SDK Tools : 26.1.1 (/Users/kim/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.1
   NodeJS            : v10.15.0 (/usr/local/bin/node)
   npm               : 6.10.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001
@ionitron-bot ionitron-bot bot added the triage label Jul 4, 2019
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Jul 8, 2019
@ionitron-bot ionitron-bot bot removed triage labels Jul 8, 2019
@liamdebeasi
Copy link
Contributor

Thanks! I created a CodePen of the bug here: https://codepen.io/liamdebeasi/pen/ewMdLg

@narhc8
Copy link

narhc8 commented Mar 26, 2020

@liamdebeasi Has this been fixed? I still experience this issue with Ionic 5.0.5 when ion-content is set to fullscreen with the ion-refresher within that.

@ghenry22
Copy link

@liamdebeasi any chance of a fix for the refresher? I have the latest release of ionic v5 and still just see a blank space when pulling to refresh if ion-content has fullscreen="true". Makes for a terrible user experience as the user has no idea what they have done or what is happening.

@stephenglass
Copy link

Can confirm ion-refresher does not work with fullscreen on iOS using latest version of Ionic React

@o-dlr-o
Copy link

o-dlr-o commented Jan 14, 2021

Hello, maybe you can try to increase pullMin value.

@fr3fou
Copy link

fr3fou commented Jul 21, 2021

Will this be fixed in Ionic 6?

@lyubchev
Copy link

I hope we see a fix for this in Ionic 6 ...

@mxmlc
Copy link

mxmlc commented Sep 6, 2021

Well, I just came across the issue by chance. I know that's not an elegant solution as custom ones will show over the content of the page but, while we wait for a definitive solution, overriding the following style in my global.scss and changing its default z-index from -1 to 1 (or greater) works for me:
ion-refresher.refresher-active { z-index: 1; }

@GuidoGagliardini
Copy link

Hello, I have a similar error.
On the web the spinner show when I am testing the app, but when I compile for IOS in the application the spinner not show.


Ionic:

   Ionic CLI                     : 6.19.1 (/usr/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.4.4
   @angular-devkit/build-angular : 0.1000.8
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : browser 6.0.0, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 11 other plugins)

Utility:

   cordova-res                          : 0.15.4
   native-run (update available: 1.7.1) : 1.4.1

System:

   Android SDK Tools : 26.1.1 (/home/guidogagliardini/NuevosDocs/Android/Sdk)
   NodeJS            : v14.19.1 (/home/guidogagliardini/.nvm/versions/node/v14.19.1/bin/node)
   npm               : 6.14.16
   OS                : Linux 5.15

  <ion-refresher  slot="fixed"
    (ionRefresh)="doRefresh($event)"
    pull-factor="1.2"
    pull-min="60"
    pull-max="40"
    snapback-duration="200ms">
    <ion-refresher-content
    pullingIcon="lines"
    refreshingSpinner="bubbles"
    ></ion-refresher-content>
  </ion-refresher>

@liamdebeasi liamdebeasi added type: bug a confirmed bug report and removed type: bug a confirmed bug report labels Apr 21, 2023
@grantur5707
Copy link

grantur5707 commented May 5, 2024

I have a problem with ion-refresher not displaying correctly inside ion-content, which has a fullscreen attribute too. I'm not the only one who has had this problem.

<ion-content class="ion-padding" fullscreen>
    <ion-refresher slot="fixed" [pullFactor]="0.5" [pullMin]="120" [pullMax]="200" (ionRefresh)="handleRefresh($event)">
        <ion-refresher-content
            pullingIcon="chevron-down"
            pullingText="Потяните для обновления"
            refreshingSpinner="circles"
            refreshingText="Обновление...">
        </ion-refresher-content>
    </ion-refresher>
    <ion-grid>
       ...
    </ion-grid>
</ion-content>

As a workaround, I had to reassign z-index to the ion-refresher class:

ion-refresher.refresher-active {
   z-index: 1;
}

Steps to Reproduce

  1. Create in the template and add the fullscreen attribute:
  2. Place inside and make sure the refresher is not displayed correctly

Ionic Info
$ ionic info
[ERROR] Error loading @ionic/angular package.json: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package' is not defined by "exports" in D:\AppWork\VmestePlus\node_modules@ionic\angular\package.json

Ionic:

Ionic CLI : 5.4.16
Ionic Framework : not installed
@angular-devkit/build-angular : 17.3.5
@angular-devkit/schematics : 17.3.5
@angular/cli : 17.3.5
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 5.7.3
@capacitor/core : 5.7.3

Cordova:

Cordova CLI : 12.0.0 ([email protected])
Cordova Platforms : not available
Cordova Plugins : not available

Utility:

cordova-res : not installed
native-run : 2.0.1

System:

NodeJS : v20.12.0 (C:\Program Files\nodejs\node.exe)
npm : 10.5.0
OS : Windows 10

github-merge-queue bot pushed a commit that referenced this issue Jun 12, 2024
Issue number: resolves #18714

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

When the `ion-content` has the fullscreen attribute, the `ion-refresher`
will be hidden while refreshing. This can be seen by dragging far enough
to trigger it to snap back and refresh.

The refresher ends up being hidden behind the background content
element.


https:/ionic-team/ionic-framework/assets/13530427/27b5393b-dd31-44a5-b872-97709e3a0980


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Set the `--offset-top` to `0px` for the background content element.
This reflects the same behavior of when the content is not fullscreen.
By setting this to `0px`, the refresher is visible while refreshing.
- Added a private prop within refresher to keep track of whether
`ion-content` is `fullscreen` or not.
- Added test.

Originally, I was going to update the `pullMin` and `pullMax` as agreed
on from the investigation ticket. However, it ended up adding too much
space between the refresher and the content. This is the reason why I
decided to modify the background background instead. Otherwise, it
wouldn't mimic the behavior when content doesn't have the `fullscreen`
attribute.

Example of what the spacing looked like:


https:/ionic-team/ionic-framework/assets/13530427/389cea62-48c1-4464-be47-44bc3b6c0315


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https:/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->


[Preview](https://ionic-framework-git-rou-4950-ionic1.vercel.app/src/components/refresher/test/fullscreen)

How to test:
1. Navigate to the preview page
2. Use the browser's simulator to chose an iOS device (might need to
refresh the page)
3. Drag the screen down
4. Verify that the refreshing text is shown
5. Use the browser's simulator to chose an Android device (might need to
refresh the page)
6. Drag the screen down
7. Verify that the refreshing text is shown
@thetaPC
Copy link
Contributor

thetaPC commented Jun 12, 2024

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

Copy link

ionitron-bot bot commented Jul 12, 2024

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 Jul 12, 2024
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