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

[V3] Content: scroll events not enabled #10948

Closed
jsayol opened this issue Mar 28, 2017 · 4 comments
Closed

[V3] Content: scroll events not enabled #10948

jsayol opened this issue Mar 28, 2017 · 4 comments

Comments

@jsayol
Copy link
Contributor

jsayol commented Mar 28, 2017

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.0.0-beta.3

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request

Current behavior:
The ionScroll, ionScrollStart, and ionScrollEnd outputs of the Content component never emit.

Expected behavior:
These outputs should emit on scroll events.

Steps to reproduce:
Either on the template:

<ion-content (ionScroll)="doSomething($event)"></ion-content>

Or inside a component that has Content:

// ...
@ViewChild(Content) content: Content;
// ...
this.content.ionScroll.subscribe(event => { /* do something */});

Related code:
It seems these 3 EventEmiters are not attached to the underlying ScrollView events, since enableScrollListener() is never called: https://github.com/driftyco/ionic/blob/63fd63e72e8cf44767ec8ca2d6ba0e6b9f071317/src/components/content/content.ts#L386-L418

If I manually enable it, then the scroll otuputs emit events as expected. But that shouldn't be necessary, considering I'm accessing @hidden methods and properties:

if (!this.content._scroll.enabled) {
  this.content.enableScrollListener();
}

Other information:

Ionic info:

  Your system information:

    Cordova CLI: 6.5.0
    Ionic Framework Version: 3.0.0-beta.3
    Ionic CLI Version: 3.0.0-beta.5
    ios-deploy version: Not installed
    ios-sim version: Not installed
    OS: Windows 10
    Node Version: v7.7.1
    Xcode version: Not installed
@brandyscarney
Copy link
Member

brandyscarney commented Mar 28, 2017

Thanks for the detailed issue! It seems this was an issue in 2.3.0 also, duplicate of #10938.

@jsayol
Copy link
Contributor Author

jsayol commented Mar 28, 2017

Oops, sorry, should have checked. Closing this in favor of #10938.

@jsayol jsayol closed this as completed Mar 28, 2017
@brandyscarney
Copy link
Member

@jsayol Ha, I just realized I linked you back to your own issue. Oops, glad you found it. :)

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 3, 2018

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 Sep 3, 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