MGWT ScrollPanel.scrollTo(0, y) leads to Cannot read property 'style' of undefined

32 views
Skip to first unread message

Chris French

unread,
Aug 8, 2016, 4:34:17 AM8/8/16
to mgwt
I have a problem when I try to set the scroll position in a scroll panel as follows:

'MGWT ScrollPanel.scrollTo(0, y) leads to Cannot read property 'style' of undefined'

I notice that the above is marked as an outstanding issue.  Does anyone know of a workaround for this?  The really funny thing is that I have done the same thing on a different scroll panel in the same application and it works fine.  Must me something to do with the content perhaps?

3xM

unread,
Aug 11, 2016, 2:42:16 PM8/11/16
to mgwt
Can you check if the scroll panel variable is initialized at the time you call scrollTo method?

paul

unread,
Aug 15, 2016, 7:04:22 AM8/15/16
to mgwt
Can we see the context of your code. Like 3xM suggests, you may need to wait until the scrollpanel has actually been rendered before calling scrollTo. Possibly try executing scrollTo in a ScheduledCommand
Reply all
Reply to author
Forward
0 new messages