From 869f5113d966c88c303dbd3bcf6d1c655abdd6eb Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 23 Apr 2026 13:43:41 +1000 Subject: [PATCH] fix highlighting error --- js/popup.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/popup.js b/js/popup.js index 71b72d4..da88dc3 100644 --- a/js/popup.js +++ b/js/popup.js @@ -451,8 +451,8 @@ class Popup extends HTMLElement { latestImage = create('img', null, this.grid, {src:get_full_url(url)}) latestImage.onload = this.layout.bind(this) latestImage.image_index = i/this.video_frames - latestImage.addEventListener('mouseover', (e)=>this.on_mouse_enter(latestImage)) - latestImage.addEventListener('mouseout', (e)=>this.on_mouse_out(latestImage)) + latestImage.addEventListener('mouseover', this.on_mouse_enter.bind(this)) + latestImage.addEventListener('mouseout', this.on_mouse_out.bind(this)) latestImage.frames = [get_full_url(url),] } else { latestImage.frames.push(get_full_url(url)) @@ -484,12 +484,12 @@ class Popup extends HTMLElement { setTimeout(this.advance_videos.bind(this), delay) } - on_mouse_enter(img) { - this.mouse_is_over = img + on_mouse_enter(e) { + this.mouse_is_over = e.target this.redraw() } - on_mouse_out(img) { + on_mouse_out(e) { this.mouse_is_over = null this.redraw() }