ion-affix icon indicating copy to clipboard operation
ion-affix copied to clipboard

Fix to issue 32 when using Ionic v4

Open invot opened this issue 5 years ago • 4 comments

In Ionic v4 there is no more ion-scroll component, so using this plugin will result in Module not found: Error: Can't resolve 'ionic-angular'

https://github.com/jonaszuberbuehler/ion-affix/issues/32

invot avatar Dec 18 '19 17:12 invot

Hi @invot, thx for the PR. It will prevent the Module not found error but not actually be usable, right? Has been month's since I last had time to look at Ionic 4. Back then, this plugin had to be rewritten completely to make it work (see https://github.com/jonaszuberbuehler/ion-affix/issues/26).

jonaszuberbuehler avatar Dec 18 '19 17:12 jonaszuberbuehler

I haven't fully tested it yet but that's the idea. There doesn't seem to be an ion-scroll anymore so pulling that out should help. I should be done testing this by the end of the week. I'll let you know if I see any issues.

invot avatar Dec 18 '19 17:12 invot

changes on adapter-factory.js file, is giving the following errors

ERROR TypeError: this.content.getScrollElement(...).getBoundingClientRect is not a function
    at ContentAdapter.push../node_modules/ion-affix/dist/directives/adapters/content-adapter.js.ContentAdapter.getClientTop (content-adapter.js:20)
    at IonAffix.push../node_modules/ion-affix/dist/directives/ion-affix.js.IonAffix.ngAfterViewInit (ion-affix.js:32)
    at callProviderLifecycles (core.js:28206)
    at callElementProvidersLifecycles (core.js:28171)
    at callLifecycleHooksChildrenFirst (core.js:28153)
    at checkAndUpdateView (core.js:38386)
    at callViewAction (core.js:38742)
    at execComponentViewsAction (core.js:38670)
    at checkAndUpdateView (core.js:38383)
    at callWithDebugContext (core.js:39716)

gayali avatar Mar 03 '20 08:03 gayali

Same problem here. Someone found solution?

leabdalla avatar Oct 08 '20 21:10 leabdalla