forked from EVOgeek/Vmeda.Online
		
	MOBILE-3833 course: Fix conflict with automatic scrolls
This commit is contained in:
		
							parent
							
								
									fff702edab
								
							
						
					
					
						commit
						785d8390e8
					
				| @ -509,12 +509,14 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { | |||||||
|         const moduleIdToScroll = this.moduleId && previousValue === undefined ? this.moduleId : moduleId; |         const moduleIdToScroll = this.moduleId && previousValue === undefined ? this.moduleId : moduleId; | ||||||
|         if (moduleIdToScroll) { |         if (moduleIdToScroll) { | ||||||
|             this.scrollToModule(moduleIdToScroll); |             this.scrollToModule(moduleIdToScroll); | ||||||
|         } else { |  | ||||||
|             this.content.scrollToTop(0); |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (!previousValue || previousValue.id != newSection.id) { |         if (!previousValue || previousValue.id !== newSection.id) { | ||||||
|             // First load or section changed, add log in Moodle.
 |             // First load or section changed.
 | ||||||
|  |             if (!moduleIdToScroll) { | ||||||
|  |                 this.content.scrollToTop(0); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|             CoreUtils.ignoreErrors( |             CoreUtils.ignoreErrors( | ||||||
|                 CoreCourse.logView(this.course.id, newSection.section, undefined, this.course.fullname), |                 CoreCourse.logView(this.course.id, newSection.section, undefined, this.course.fullname), | ||||||
|             ); |             ); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user