Skip to content
Product and web UIguide

How to avoid dragging a toolbar icon by accident

By SkeuDesign Editorial Team1 min read

Answer in brief

Set draggable="false" on an image inside a control if the native image drag competes with the interaction. Keep activation attached to the surrounding control.

Test a toolbar on desktop

Press on the image in a color-picker button and move the mouse slightly before release. Compare the action before and after disabling native image dragging. Also activate the control with its keyboard shortcut or standard button keys.

A linked thumbnail can start a link drag even if the nested image disables image dragging. Reproduce the exact gesture inside and outside the link. If the thumbnail is a navigation link, preserve its normal navigation behavior while deciding whether preventing link dragging is appropriate for this interaction.

Sources

  1. [1] draggable HTML global attribute - HTML — MDN Web Docs, accessed November 23, 2026

Frequently asked questions

Is draggable a Boolean attribute?

Its value is enumerated. Use the explicit string false for markup that should disable native dragging.