Fix the seek tooltip time difference from seek time
This commit is contained in:
		
							
								
								
									
										2
									
								
								src/js/controls.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								src/js/controls.js
									
									
									
									
										vendored
									
									
								
							@ -443,7 +443,7 @@ const controls = {
 | 
			
		||||
 | 
			
		||||
        // Calculate percentage
 | 
			
		||||
        let percent = 0;
 | 
			
		||||
        const clientRect = this.elements.inputs.seek.getBoundingClientRect();
 | 
			
		||||
        const clientRect = this.elements.progress.getBoundingClientRect();
 | 
			
		||||
        const visible = `${this.config.classNames.tooltip}--visible`;
 | 
			
		||||
 | 
			
		||||
        const toggle = toggle => {
 | 
			
		||||
 | 
			
		||||
@ -6,10 +6,15 @@
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex: 1;
 | 
			
		||||
    position: relative;
 | 
			
		||||
    margin-right: $plyr-range-thumb-height;
 | 
			
		||||
    left: $plyr-range-thumb-height / 2;
 | 
			
		||||
 | 
			
		||||
    input[type='range'] {
 | 
			
		||||
        position: relative;
 | 
			
		||||
        z-index: 2;
 | 
			
		||||
        // Offset the range thumb in order to be able to calculate the relative progress (#954)
 | 
			
		||||
        width: calc(100% + #{$plyr-range-thumb-height}) !important;
 | 
			
		||||
        margin: 0 -#{$plyr-range-thumb-height / 2} !important;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Seek tooltip to show time
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user