mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-21 23:03:11 -05:00
Release v2.2.7
This commit is contained in:
parent
d23363e153
commit
38754f17f9
10 changed files with 28 additions and 21 deletions
|
@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file, starting fr
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.2.7] - 2024-02-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix handling of Japanese IME input.
|
||||
- Fix willPaste event not cancelable.
|
||||
|
||||
## [2.2.6] - 2024-02-01
|
||||
|
||||
### Fixed
|
||||
|
|
8
dist/squire-raw.js
vendored
8
dist/squire-raw.js
vendored
|
@ -1904,7 +1904,7 @@
|
|||
|
||||
// source/keyboard/KeyHandlers.ts
|
||||
var _onKey = function(event) {
|
||||
if (event.defaultPrevented) {
|
||||
if (event.defaultPrevented || event.isComposing) {
|
||||
return;
|
||||
}
|
||||
let key = event.key;
|
||||
|
@ -1930,9 +1930,7 @@
|
|||
const range = this.getSelection();
|
||||
if (this._keyHandlers[key]) {
|
||||
this._keyHandlers[key](this, event, range);
|
||||
} else if (!range.collapsed && // !event.isComposing stops us from blatting Kana-Kanji conversion in
|
||||
// Safari
|
||||
!event.isComposing && !event.ctrlKey && !event.metaKey && key.length === 1) {
|
||||
} else if (!range.collapsed && !event.ctrlKey && !event.metaKey && key.length === 1) {
|
||||
this.saveUndoState(range);
|
||||
deleteContentsOfRange(range, this._root);
|
||||
this._ensureBottomLine();
|
||||
|
@ -2866,6 +2864,7 @@
|
|||
let doInsert = true;
|
||||
if (isPaste) {
|
||||
const event = new CustomEvent("willPaste", {
|
||||
cancelable: true,
|
||||
detail: {
|
||||
fragment: frag
|
||||
}
|
||||
|
@ -2966,6 +2965,7 @@
|
|||
let doInsert = true;
|
||||
if (isPaste) {
|
||||
const event = new CustomEvent("willPaste", {
|
||||
cancelable: true,
|
||||
detail: {
|
||||
text: plainText
|
||||
}
|
||||
|
|
8
dist/squire-raw.mjs
vendored
8
dist/squire-raw.mjs
vendored
|
@ -1901,7 +1901,7 @@ var Space = (self, event, range) => {
|
|||
|
||||
// source/keyboard/KeyHandlers.ts
|
||||
var _onKey = function(event) {
|
||||
if (event.defaultPrevented) {
|
||||
if (event.defaultPrevented || event.isComposing) {
|
||||
return;
|
||||
}
|
||||
let key = event.key;
|
||||
|
@ -1927,9 +1927,7 @@ var _onKey = function(event) {
|
|||
const range = this.getSelection();
|
||||
if (this._keyHandlers[key]) {
|
||||
this._keyHandlers[key](this, event, range);
|
||||
} else if (!range.collapsed && // !event.isComposing stops us from blatting Kana-Kanji conversion in
|
||||
// Safari
|
||||
!event.isComposing && !event.ctrlKey && !event.metaKey && key.length === 1) {
|
||||
} else if (!range.collapsed && !event.ctrlKey && !event.metaKey && key.length === 1) {
|
||||
this.saveUndoState(range);
|
||||
deleteContentsOfRange(range, this._root);
|
||||
this._ensureBottomLine();
|
||||
|
@ -2863,6 +2861,7 @@ var Squire = class {
|
|||
let doInsert = true;
|
||||
if (isPaste) {
|
||||
const event = new CustomEvent("willPaste", {
|
||||
cancelable: true,
|
||||
detail: {
|
||||
fragment: frag
|
||||
}
|
||||
|
@ -2963,6 +2962,7 @@ var Squire = class {
|
|||
let doInsert = true;
|
||||
if (isPaste) {
|
||||
const event = new CustomEvent("willPaste", {
|
||||
cancelable: true,
|
||||
detail: {
|
||||
text: plainText
|
||||
}
|
||||
|
|
4
dist/squire.js
vendored
4
dist/squire.js
vendored
File diff suppressed because one or more lines are too long
4
dist/squire.js.map
vendored
4
dist/squire.js.map
vendored
File diff suppressed because one or more lines are too long
8
dist/squire.mjs
vendored
8
dist/squire.mjs
vendored
File diff suppressed because one or more lines are too long
4
dist/squire.mjs.map
vendored
4
dist/squire.mjs.map
vendored
File diff suppressed because one or more lines are too long
2
dist/types/Editor.d.ts.map
vendored
2
dist/types/Editor.d.ts.map
vendored
File diff suppressed because one or more lines are too long
2
dist/types/keyboard/KeyHandlers.d.ts.map
vendored
2
dist/types/keyboard/KeyHandlers.d.ts.map
vendored
|
@ -1 +1 @@
|
|||
{"version":3,"file":"KeyHandlers.d.ts","sourceRoot":"","sources":["../../../source/keyboard/KeyHandlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAWxC,QAAA,MAAM,MAAM,SAAmB,MAAM,SAAS,aAAa,KAAG,IAkD7D,CAAC;AAIF,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAE7E,QAAA,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAoC3C,CAAC;AAyGF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}
|
||||
{"version":3,"file":"KeyHandlers.d.ts","sourceRoot":"","sources":["../../../source/keyboard/KeyHandlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAWxC,QAAA,MAAM,MAAM,SAAmB,MAAM,SAAS,aAAa,KAAG,IAiD7D,CAAC;AAIF,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAE7E,QAAA,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAoC3C,CAAC;AAyGF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "squire-rte",
|
||||
"version": "2.2.6",
|
||||
"version": "2.2.7",
|
||||
"description": "Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible.",
|
||||
"main": "dist/squire.mjs",
|
||||
"types": "dist/types/Squire.d.ts",
|
||||
|
|
Loading…
Reference in a new issue