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

The height of the element keeps increasing #6

Closed
CarsonChen1129 opened this issue Nov 15, 2016 · 7 comments
Closed

The height of the element keeps increasing #6

CarsonChen1129 opened this issue Nov 15, 2016 · 7 comments

Comments

@CarsonChen1129
Copy link

Hi, thank you very much for developing this. When I install and apply this module to my app (an Ionic 2 app), I find out that the height of the ion-alpha-scroll keeps increasing (Won't stop, caused the app to crash). I strictly followed the instruction to set up everything. I would appreciate for any help. Thank you.

@rossmartin
Copy link
Owner

Thanks for reporting the issue. Can you let me know what platform this is for? Is it on a real device or in browser only?

Can you share the markup to your ion-content that has the ion-alpha-scroll ?

There is another issue open like this mentioning that the issue occurs when there are other elements inside the ion-content. I may need to revise the component to accommodate for this situation.

@CarsonChen1129
Copy link
Author

CarsonChen1129 commented Nov 18, 2016

Hi Ross, thank you very much for the reply. I am developing an Android app, and the issue happened in the browser. (I haven't got a chance to test it on the real device since it is not working in the browser).
I just simply put inside a , like the following:

<ion-content padding>
<ion-alpha-scroll *ngIf="glossary"
      [listData]="glossary"
      key="name"
      [itemTemplate]="alphaScrollItemTemplate"
      [currentPageClass]="currentPageClass"
      [triggerChange]="triggerAlphaScrollChange">
      </ion-alpha-scroll>
</ion-content>

Here is my ionic info just in case if it is a version issue:

Cordova CLI: 6.3.1 
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.23
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62

Somehow I found an alternative solution to achieve one of the functionalities that was introduced by this amazing plugin (ScrollTo specific elements). Thank you very much again for developing this.

@vineetdpnd
Copy link

I am facing this issue on the browser. The scroll height keeps on increasing .

Following is my code :-

*
<ion-alpha-scroll ngIf="resources"
[listData]="resources"
key="title"
[itemTemplate]="alphaScrollItemTemplate"
[currentPageClass]="currentPageClass"
[triggerChange]="triggerAlphaScrollChange">

And my ionic version :-

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed

@rossmartin
Copy link
Owner

rossmartin commented Nov 22, 2016

@vineetdpnd What does your alphaScrollItemTemplate look like? What browser are you using?

@piuen0
Copy link

piuen0 commented Dec 29, 2016

I tried to edit below lines in ion-alpha-scroll.js, and the problem fixed, see if it works for you.

*Changed height: dimensions.scrollHeight + 'px', to height: dimensions.contentHeight + 'px',

//line 62

IonAlphaScroll.prototype.calculateScrollDimensions = function () {
  var dimensions = this._content.getContentDimensions();
  return {
    height: dimensions.contentHeight + 'px',
    width: (dimensions.contentWidth - 20) + 'px'
  };
};

@rossmartin
Copy link
Owner

@vineetdpnd @piuen0 This is solved via 26a4fae

New version (1.0.8) will be available soon.

@vineetdpnd
Copy link

@rossmartin Thanks for the update , I will try it out later this weekend and let you know if it works fine .

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

No branches or pull requests

4 participants