I have this line in my code:
this.template.querySelector('.some-class').scrollIntoView();
and it works on desktops (at least it scrolls a bit) but doesn't work in Salesforce Mobile App at all.
Do you have any known workarounds to make it working on both desktops and mobiles? I need to bring certain div into the view.
Add a comment
|
1 Answer
You need to put an object with some parameters: element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' })
-
No, unfortunately it doesn't work as well (it does on desktop, but not in the SF Mobile App on iOS)– jm.Commented Jun 29, 2021 at 10:50
-
Interesting that exact line is working for me on SF Mobile App on iOS so there might be something more going on. Commented Jul 1, 2021 at 9:49