I'm unable to add custom scroll due to the component/namespace encapsulation when locker service is activated in Salesforce1 app. Since the Scrollable is still not compatible with Salesforce1 app, and also because <ui:scrollerwrapper> cannot be used to add dynamic scroll functionality, I'm depending on an external custom scroll plugin.
So, I've used jQuery nicescroll plugin to implement niceScroll functionality inside the ui:inputTextArea. And to use it I'm accessing ui:inputTextArea by its aura id:-
component.find("editModeScrollBarY").getElement() Since this is not in my namespace I'm getting an error:-
component.find(...).getElement is not a function
Here's the link to the unmanaged package to reproduce the issue when Locker Service is active:-
Standard repro steps:
- Install the package.
- Activate Lightning Page from Lightning App Builder. (Lightning App Builder--> Edit "niceScroll_LS_Issue"--> Save--> Activation--> Lightning Experience--> Add Page to app--> Save )
- Open Sales app and click on "niceScroll_LS_Issue" tab (Try loading the page when Locker Service is activated and when Locker Service is deactivated).
I understand, that I'm accessing ui:inputTextArea which is outside the namespace, which is not allowed as per Locker Service as Doug has clearly answered here.
Can someone here help me on how to implement scroll functionality in this case?