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

fix(ion-backdrop): new ion-backdrop can prevent background scrolling #6687

Merged
merged 1 commit into from
Jun 2, 2016

Conversation

manucorporat
Copy link
Contributor

@manucorporat manucorporat commented May 28, 2016

Short description of what this resolves:

New ion-backdrop component can prevent background scrolling fixing: #6656 in Alerts, Popover, actionsheet, loading...

Changes proposed in this pull request:

  • Replace all <div class="backdrop" ...> with <ion-backdrop>

  • MenuBackdrop is not longed needed

  • We don't longer have to listen for touchmove events!! performant solution

  • Backdrop injects a class at body level in order to prevent scrolling:

    body.stop-scroll scroll-content {
    overflow-y: hidden;
    overflow-x: hidden;
    }

Bonus: this code was repeated all over the place, now it is much more compact.

Before:

<div (click)="bdClick()" tappable disable-activated class="backdrop" role="presentation"></div>

After:

<ion-backdrop (click)="bdClick()"></ion-backdrop>

Ionic Version: 2.x

Fixes: #6656

@adamdbradley
Copy link
Contributor

@manucorporat How does this perform on slow Android during a transition? My concern is modifying the body element, which causes a repaint on the entire app, so it may occasionally add a flicker. Overall I think it's a great solution, just want to double check first that slow Android doesn't have a flicker.

@manucorporat
Copy link
Contributor Author

@adamdbradley on device iOS even in a slow UIWebView I didn't notice any flicker, on android I didn't tried... BUT! if this is a iOS only issue, we may don't have to modify the body on android... right?

I can do some quick research today.

@manucorporat manucorporat force-pushed the fix-backdrop branch 4 times, most recently from 77aab0d to 7034be9 Compare May 31, 2016 21:48
@brandyscarney brandyscarney self-assigned this Jun 2, 2016
@brandyscarney brandyscarney merged commit 4af5e03 into ionic-team:2.0 Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants