File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 190190 * Scrolls the content to a particular place.
191191 *
192192 * @method scroll
193- * @param {number|!ScrollToOptions } leftOrOptions The left position or scroll options
193+ * @param {number|!{left: number, top: number} } leftOrOptions The left position or scroll options
194194 * @param {number= } top The top position
195195 * @return {void }
196196 */
197197 scroll : function ( leftOrOptions , top ) {
198- var left = leftOrOptions ;
198+ var left ;
199199
200200 if ( typeof leftOrOptions === 'object' ) {
201201 left = leftOrOptions . left ;
202202 top = leftOrOptions . top ;
203+ } else {
204+ left = leftOrOptions ;
203205 }
204206
207+ left = left || 0 ;
208+ top = top || 0 ;
205209 if ( this . scrollTarget === this . _doc ) {
206210 window . scrollTo ( left , top ) ;
207211 } else if ( this . _isValidScrollTarget ( ) ) {
You can’t perform that action at this time.
0 commit comments