From 29b119705915d1e239d0f0e5b4af9ef542c9bfe7 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 12 Jul 2023 22:02:41 +0200 Subject: [PATCH] add code comment/documentation --- modules/util/get_set_value.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/util/get_set_value.js b/modules/util/get_set_value.js index cca02ddbd..da5ad741d 100644 --- a/modules/util/get_set_value.js +++ b/modules/util/get_set_value.js @@ -28,6 +28,8 @@ export function utilGetSetValue(selection, value, shouldUpdate) { } function stickyCursor(func) { + // only certain input element types allow manipulating the cursor + // see https://html.spec.whatwg.org/multipage/input.html#concept-input-apply const supportedTypes = ['text', 'search', 'url', 'tel', 'password']; return function() { if (!supportedTypes.includes(this.type)) {