mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 17:10:07 +00:00
fix: Prevent text selection in MediaAssetCard (#6708)
## Summary - Prevent text selection when clicking or dragging MediaAssetCard - Add `select-none` Tailwind class to prevent unwanted text highlighting ## Changes - Changed class from `gap-1` to `gap-1 select-none` in MediaAssetCard container ## Problem When users click or drag on a MediaAssetCard, the text content (tags, titles, descriptions, buttons) gets selected and highlighted, which creates a poor user experience. ## Solution Added the `select-none` Tailwind CSS class which applies `user-select: none` to prevent text selection within the card during mouse interactions. ## Test plan - [x] Click on MediaAssetCard and verify text is not selected - [x] Drag across MediaAssetCard and verify text is not highlighted - [x] Verify card selection still works properly - [x] Verify buttons and interactive elements still work 🤖 Generated with [Claude Code](https://claude.com/claude-code) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6708-fix-Prevent-text-selection-in-MediaAssetCard-2ac6d73d365081f6bec2ffebad7cb7ed) by [Unito](https://www.unito.io) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -248,7 +248,7 @@ provide(MediaAssetKey, {
|
||||
|
||||
const containerClasses = computed(() =>
|
||||
cn(
|
||||
'gap-1',
|
||||
'gap-1 select-none',
|
||||
selected
|
||||
? 'border-3 border-zinc-900 dark-theme:border-white bg-zinc-200 dark-theme:bg-zinc-700'
|
||||
: 'hover:bg-zinc-100 dark-theme:hover:bg-zinc-800'
|
||||
|
||||
Reference in New Issue
Block a user