From d7823176be02665258e4e5baa14570b311b38f4b Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:52:20 +0000 Subject: [PATCH 1/3] fix --- .../web/api/html_drag_and_drop_api/drag_operations/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md b/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md index 96c55683c879f4f..9c6f003c827c35d 100644 --- a/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md +++ b/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md @@ -171,8 +171,8 @@ You can combine the values in various ways: - : `link` or `move` only - `all` - : `copy`, `move`, or `link` -- uninitialized - - : The default value is `all`. +- `uninitialized` + - : the default value when the effect has not been set, equivalent to `all`. Note that these values must be used exactly as listed above. For example, setting the {{domxref("DataTransfer.effectAllowed","effectAllowed")}} property to `copyMove` allows a copy or move operation but prevents the user from performing a link operation. If you don't change the {{domxref("DataTransfer.effectAllowed","effectAllowed")}} property, then any operation is allowed, just like with the '`all`' value. So you don't need to adjust this property unless you want to exclude specific types. From 9be854b761ca0120433584acfa88eccf92df5c55 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:09:04 +0000 Subject: [PATCH 2/3] fix spell --- .../web/api/html_drag_and_drop_api/drag_operations/index.md | 2 +- files/en-us/web/api/html_drag_and_drop_api/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md b/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md index 9c6f003c827c35d..34ab8294a06ef72 100644 --- a/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md +++ b/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md @@ -214,7 +214,7 @@ dropElement.addEventListener("dragover", (event) => { }); ``` -Calling the {{domxref("Event.preventDefault","preventDefault()")}} method during both a {{domxref("HTMLElement/dragenter_event", "dragenter")}} and {{domxref("HTMLElement/dragover_event", "dragover")}} event will indicate that a drop is allowed at that location. However, you will commonly wish to call the {{domxref("Event.preventDefault","preventDefault()")}} method only in certain situations (for example, only if a link is being dragged). +Calling the {{domxref("Event.preventDefault","preventDefault()")}} method during both the {{domxref("HTMLElement/dragenter_event", "dragenter")}} and {{domxref("HTMLElement/dragover_event", "dragover")}} event will indicate that a drop is allowed at that location. However, you will commonly wish to call the {{domxref("Event.preventDefault","preventDefault()")}} method only in certain situations (for example, only if a link is being dragged). To do this, call a function which checks a condition and only cancels the event when the condition is met. If the condition is not met, don't cancel the event, and a drop will not occur there if the user releases the mouse button. diff --git a/files/en-us/web/api/html_drag_and_drop_api/index.md b/files/en-us/web/api/html_drag_and_drop_api/index.md index 6d6db32823fd061..4820b1b9b74beb6 100644 --- a/files/en-us/web/api/html_drag_and_drop_api/index.md +++ b/files/en-us/web/api/html_drag_and_drop_api/index.md @@ -134,7 +134,7 @@ For more details, see: #### Define a drop zone -By default, the browser prevents anything from happening when dropping something onto most HTML elements. To change that behavior so that an element becomes a _drop zone_ or is _droppable_, the element must have both {{domxref("HTMLElement.dragover_event","ondragover")}} and {{domxref("HTMLElement.drop_event","ondrop")}} event handler attributes. +By default, the browser prevents anything from happening when dropping something onto most HTML elements. To change that behavior so that an element becomes a _drop zone_ or is _droppable_, the element must listen to both {{domxref("HTMLElement.dragover_event","dragover")}} and {{domxref("HTMLElement.drop_event","drop")}} events. The following example shows how to use those attributes, and includes basic event handlers for each attribute. From 6a0b492c812e7014a012e32230a11e2cc7735cb5 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:10:24 +0000 Subject: [PATCH 3/3] small fix --- .../web/api/html_drag_and_drop_api/drag_operations/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md b/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md index 34ab8294a06ef72..7a1036d2e24c1ae 100644 --- a/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md +++ b/files/en-us/web/api/html_drag_and_drop_api/drag_operations/index.md @@ -172,7 +172,7 @@ You can combine the values in various ways: - `all` - : `copy`, `move`, or `link` - `uninitialized` - - : the default value when the effect has not been set, equivalent to `all`. + - : the default value when the effect has not been set, equivalent to `all` Note that these values must be used exactly as listed above. For example, setting the {{domxref("DataTransfer.effectAllowed","effectAllowed")}} property to `copyMove` allows a copy or move operation but prevents the user from performing a link operation. If you don't change the {{domxref("DataTransfer.effectAllowed","effectAllowed")}} property, then any operation is allowed, just like with the '`all`' value. So you don't need to adjust this property unless you want to exclude specific types.