jonaszuberbuehler / ion-affix

A directive for Ionic framework for creating affix headers.
MIT License
57 stars 20 forks source link

ON Android emulator show me this error #22

Open fagianijunior opened 6 years ago

fagianijunior commented 6 years ago

Using: Ionic v1 (last v1 release)

Running in the browser or in the iOs emulator show like a charm, but on Android emulator and Android device the div dont sticky and freeze the App.

This show in my debuger: ion-affix.js:182 Uncaught TypeError: Cannot read property 'scrollTop' of undefined

HTML

<ion-view title="Parceiros" hide-back-button="true">
...
<ion-content padding="true" class="has-header" delegate-handle="myPageDelegate">
...
<ion-list class="parceiros">
      <div style="background-color: white;" ion-affix data-affix-within-parent-with-class="parceiros">
        <div class="row">
          <div class="col">
            <form id="parceiros-form2" class="list">
              <label class="item item-input" id="parceiros-search1">
                <i class="icon ion-search placeholder-icon"></i>
                <input type="search" placeholder="" ng-model="search.$" ng-change="filterChange()">
              </label>
            </form>
          </div>
          <div class="col-15">
            <button class="button button-clear button-large" ng-class="{'icon ion-bag': ativo, 'icon ion-ios-heart button-assertive': !ativo}"
              ng-click="filterFavoritos(ativo=!ativo)"></button>
          </div>
        </div>
      </div>
      <ion-item id="parceiros" class="item-text-wrap text-center">
         Parceiros
      </ion-item>
      <div ng-repeat="parceiro in rootParceiros | filter:search | orderBy:'attributes.enderecos[0].distancia':reverse" ng-minlength="2">
        <ion-item class="item-thumbnail-left item-icon-right" ng-if="parceiro.attributes['publicar']" style="padding-bottom:0;">
...
        </ion-item>
      </div>
    </ion-list>
jonaszuberbuehler commented 6 years ago

Are you really using Ionic V1 (angularjs based)? If so I didn’t know this plug-in would work at all.

fagianijunior commented 6 years ago

Yes, AngularJS. This work in iOs but not in Android. this plugins is only for Ionic (v2+) with Angular?

jonaszuberbuehler commented 6 years ago

Well I needed it for Ionic 2+ and didn’t think it would work for Ionic 1.

I’m currently on holiday and don’t have too much time to look into issues. If you can have a look I‘m happy to merge any working PR.