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.
Also, neither the lightning:textarea implements default scroll functionality when it exceeds the specified height, which was released in Winter '17 (Link to the issue).
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:-
https://login.salesforce.com/packaging/installPackage.apexp?p0=04tB00000004p3m
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?