@maskito/core
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -600,2 +600,18 @@ 'use strict'; | ||
return; // will be handled inside `compositionend` event | ||
case 'insertReplacementText': | ||
/** | ||
* According {@link https://www.w3.org/TR/input-events-2 W3C specification}: | ||
* > `insertReplacementText` – insert or replace existing text by means of a spell checker, | ||
* > auto-correct, writing suggestions or similar. | ||
* ___ | ||
* Firefox emits `insertReplacementText` event for its suggestion/autofill and for spell checker. | ||
* However, it is impossible to detect which part of the textfield value is going to be replaced | ||
* (`selectionStart` and `selectionEnd` just equal to the last caret position). | ||
* ___ | ||
* Chrome does not fire `beforeinput` event for its suggestion/autofill. | ||
* It emits only `input` event with `inputType` and `data` set to `undefined`. | ||
* ___ | ||
* All these browser limitations make us to validate the result value later in `input` event. | ||
*/ | ||
return; | ||
case 'insertLineBreak': | ||
@@ -602,0 +618,0 @@ case 'insertParagraph': |
@@ -598,2 +598,18 @@ function getContentEditableSelection(element) { | ||
return; // will be handled inside `compositionend` event | ||
case 'insertReplacementText': | ||
/** | ||
* According {@link https://www.w3.org/TR/input-events-2 W3C specification}: | ||
* > `insertReplacementText` – insert or replace existing text by means of a spell checker, | ||
* > auto-correct, writing suggestions or similar. | ||
* ___ | ||
* Firefox emits `insertReplacementText` event for its suggestion/autofill and for spell checker. | ||
* However, it is impossible to detect which part of the textfield value is going to be replaced | ||
* (`selectionStart` and `selectionEnd` just equal to the last caret position). | ||
* ___ | ||
* Chrome does not fire `beforeinput` event for its suggestion/autofill. | ||
* It emits only `input` event with `inputType` and `data` set to `undefined`. | ||
* ___ | ||
* All these browser limitations make us to validate the result value later in `input` event. | ||
*/ | ||
return; | ||
case 'insertLineBreak': | ||
@@ -600,0 +616,0 @@ case 'insertParagraph': |
{ | ||
"name": "@maskito/core", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "The main zero-dependency and framework-agnostic Maskito's package to create an input mask", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93321
1686