Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

Scroll-into-view not working

$
0
0

@max_maeuschen wrote:

Trying to migrate my app to ionic 4 there’s a problem using scroll-into-view again:

There’s a searchbar to find something in content, using mark.js to highlight every hit. It’s working so far and even the wanted hit is highlighted in a special color, but using scroll-into-view to scroll to the wanted hit, it isn’t working.

xy.page.html:

<ion-content padding>
  <div [innerHtml]="content"></div>
</ion-content>

xy.page.ts: (fragments only)

import * $ from 'jquery';
import * as Mark from 'mark.js';
import * as scrollElmIntoView from 'scroll-into-view';

...

scrollToSearched() {
   ...
   scrollElmIntoView(currentMark[0], { time: 250 });
}

Can you help me? Is there any other solution to achieve this? Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>