Skip to content

Commit 0004894

Browse files
sideshowbarkerannevk
authored andcommitted
Fix broken step reference in “fire a DND event” algorithm
A step in the “fire a DND event” algorithm referred back to an action occurring in the “first step” of the algorithm, but since the time when that reference was first made, additional steps were apparently added to the beginning of the algorithm such that what had been the first step is now step 3. So this change refines the algorithm to instead set and use an internal flag rather than relying on a hardcoded reference back to a specific step. Credit to @rniwa for catching it.
1 parent cb8405e commit 0004894

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

source

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75709,6 +75709,8 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
7570975709

7571075710
<ol>
7571175711

75712+
<li>Let <var>dataDragStoreWasChanged</var> be false.</li>
75713+
7571275714
<li><p>If no specific <var>related target</var> was provided, set <var>related target</var> to
7571375715
null.</p></li>
7571475716

@@ -75717,8 +75719,9 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
7571775719

7571875720
<li>
7571975721

75720-
<p>If <var>e</var> is <code data-x="event-dnd-dragstart">dragstart</code>, set the <span>drag
75721-
data store mode</span> to the <span data-x="concept-dnd-rw">read/write mode</span>.</p>
75722+
<p>If <var>e</var> is <code data-x="event-dnd-dragstart">dragstart</code>, then set the
75723+
<span>drag data store mode</span> to the <span data-x="concept-dnd-rw">read/write mode</span>
75724+
and set <var>dataDragStoreWasChanged</var> to true.</p>
7572275725

7572375726
<p>If <var>e</var> is <code data-x="event-dnd-drop">drop</code>, set the <span>drag data store
7572475727
mode</span> to the <span data-x="concept-dnd-ro">read-only mode</span>.</p>
@@ -75850,8 +75853,8 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
7585075853
attribute. (It can only have changed value if <var>e</var> is <code
7585175854
data-x="event-dnd-dragstart">dragstart</code>.)</p></li>
7585275855

75853-
<li><p>Set the <span>drag data store mode</span> back to the <span
75854-
data-x="concept-dnd-p">protected mode</span> if it was changed in the first step.</p></li>
75856+
<li><p>If <var>dataDragStoreWasChanged</var> is true, then set the <span>drag data store
75857+
mode</span> back to the <span data-x="concept-dnd-p">protected mode</span>.</p></li>
7585575858

7585675859
<li><p>Break the association between <var>dataTransfer</var> and the <span>drag data
7585775860
store</span>.</p></li>

0 commit comments

Comments
 (0)