1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<p draggable="true">Esse parágrafo é arrastável.</p>
<p draggable="false">Esse parágrafo não é arrastável.</p>
</body>
</html>
The attribute draggable
is used to define whether a particular element is draggable or not. By default images and links are draggable, but in the case of the above example paragraphs are draggable even if the attribute draggable
is omitted and in the case of the second paragraph even giving a draggable="false"
the paragraph continues to be dragged, why does this happen? it was not for the paragraph not to be dragged?
But he is draggble
– hugocsl
Where are you running this?
– Diego Filipe Pedro Santos
@Diego Filipe Pedro Santos, No Chrome!
– user168020
The latter is disabled, but does not deactivate!
– user168020
It’s exactly this code that you’re trying to run why even in jsfiddle runs
– Diego Filipe Pedro Santos
@hugocsl, the attribute
draggable
is an enumerated attribute if the value istrue
the element is trawlable and iffalse
the element is not draggable, but even givingfalse
the element remains draggable.– user168020
@Diego Filipe Pedro Santos, the paragraph is not being dragged?
– user168020
No, look there https://jsfiddle.net/zb910pqu/7/
– Diego Filipe Pedro Santos
Let’s go continue this discussion in chat.
– Diego Filipe Pedro Santos
In the snippet above the paragraph is not being draggable.
– Sam