From f5df4866a45c5897ef5f897340b203d121d1769a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C2=A1ke?= <77801554+front42@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:28:05 +0300 Subject: [PATCH] fix: correct events related terms in selection-range article.md en --- 2-ui/99-ui-misc/02-selection-range/article.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/2-ui/99-ui-misc/02-selection-range/article.md b/2-ui/99-ui-misc/02-selection-range/article.md index 09a20bc671..ecaca3d81e 100644 --- a/2-ui/99-ui-misc/02-selection-range/article.md +++ b/2-ui/99-ui-misc/02-selection-range/article.md @@ -377,10 +377,10 @@ E.g. if the user starts selecting with mouse and goes from "Example" to "italic" There are events on to keep track of selection: -- `elem.onselectstart` -- when a selection *starts* specifically on element `elem` (or inside it). For instance, when the user presses the mouse button on it and starts to move the pointer. - - Preventing the default action cancels the selection start. So starting a selection from this element becomes impossible, but the element is still selectable. The visitor just needs to start the selection from elsewhere. -- `document.onselectionchange` -- whenever a selection changes or starts. - - Please note: this handler can be set only on `document`, it tracks all selections in it. +- `selectstart` -- when a selection *starts* specifically on element `elem` (or inside it). For instance, when the user presses the mouse button on it and starts to move the pointer. + - Preventing the default action in `elem.onselectstart` handler cancels the selection start. So starting a selection from this element becomes impossible, but the element is still selectable. The visitor just needs to start the selection from elsewhere. +- `selectionchange` -- whenever a selection changes or starts. + - Please note: `onselectionchange` handler can be set only on `document`, it tracks all selections in it. ### Selection tracking demo @@ -501,7 +501,7 @@ Properties: - `input.selectionDirection` -- selection direction, one of: "forward", "backward" or "none" (if e.g. selected with a double mouse click), Events: -- `input.onselect` -- triggers when something is selected. +- `select` -- `input.onselect` handler runs when something is selected. Methods: @@ -522,7 +522,7 @@ Now let's see these methods in action. ### Example: tracking selection -For example, this code uses `onselect` event to track selection: +For example, this code uses `select` event to track selection: ```html run autorun