Skip to content

Commit 7475cd4

Browse files
committed
Prevented drag on modal entry elems (fixes KudoAI/bravegpt#155) ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/amazongpt]
1 parent 67f538f commit 7475cd4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

chatgpt/amazongpt/amazongpt.user.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs like GPT-4o!
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.10.11.1
6+
// @version 2025.10.11.2
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon48.png?v=8e8ed1c
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon64.png?v=8e8ed1c
@@ -1343,7 +1343,10 @@
13431343
drag: {
13441344

13451345
mousedown(event) { // find modal, update styles, attach listeners, init XY offsets
1346-
if (event.button != 0) return // prevent non-left-click drag
1346+
if ( // prevent drag when...
1347+
event.button != 0 // non-left-click
1348+
|| event.target.closest('ul') // entry elem
1349+
) return
13471350
if (!/auto|default/.test(getComputedStyle(event.target).cursor))
13481351
return // prevent drag on interactive elems
13491352
modals.draggingModal = event.currentTarget

0 commit comments

Comments
 (0)