react-mentions 4.4.8 → 4.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -1937,9 +1937,9 @@ var MentionsInput = /*#__PURE__*/function (_React$Component) {
|
|
1937
1937
|
|
1938
1938
|
if (!this.supportsClipboardActions(event)) {
|
1939
1939
|
return;
|
1940
|
-
}
|
1941
|
-
|
1940
|
+
}
|
1942
1941
|
|
1942
|
+
event.preventDefault();
|
1943
1943
|
var _this$state3 = this.state,
|
1944
1944
|
selectionStart = _this$state3.selectionStart,
|
1945
1945
|
selectionEnd = _this$state3.selectionEnd;
|
@@ -1122,6 +1122,7 @@ var makeTriggerRegex = function(trigger) {
|
|
1122
1122
|
key: "handlePaste",
|
1123
1123
|
value: function(event) {
|
1124
1124
|
if (event.target === this.inputElement && this.supportsClipboardActions(event)) {
|
1125
|
+
event.preventDefault();
|
1125
1126
|
var _this$state3 = this.state, selectionStart = _this$state3.selectionStart, selectionEnd = _this$state3.selectionEnd, _this$props7 = this.props, value = _this$props7.value, children = _this$props7.children, config = readConfigFromChildren(children), markupStartIndex = mapPlainTextIndex(value, config, selectionStart, "START"), markupEndIndex = mapPlainTextIndex(value, config, selectionEnd, "END"), pastedMentions = event.clipboardData.getData("text/react-mentions"), pastedData = event.clipboardData.getData("text/plain"), newValue = spliceString(value, markupStartIndex, markupEndIndex, pastedMentions || pastedData).replace(/\r/g, ""), newPlainTextValue = getPlainText(newValue, config), eventMock = {
|
1126
1127
|
target: _objectSpread$1(_objectSpread$1({}, event.target), {}, {
|
1127
1128
|
value: newValue
|
@@ -1929,9 +1929,9 @@ var MentionsInput = /*#__PURE__*/function (_React$Component) {
|
|
1929
1929
|
|
1930
1930
|
if (!this.supportsClipboardActions(event)) {
|
1931
1931
|
return;
|
1932
|
-
}
|
1933
|
-
|
1932
|
+
}
|
1934
1933
|
|
1934
|
+
event.preventDefault();
|
1935
1935
|
var _this$state3 = this.state,
|
1936
1936
|
selectionStart = _this$state3.selectionStart,
|
1937
1937
|
selectionEnd = _this$state3.selectionEnd;
|