0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-21 23:03:11 -05:00

Release v2.2.8

This commit is contained in:
Neil Jenkins 2024-03-04 11:24:34 +11:00
parent d2e211796b
commit 72bfb9232f
10 changed files with 42 additions and 33 deletions

View file

@ -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.8] - 2024-02-21
### Fixed
- Fix some keyboard shortcuts not working on some platforms.
- Fix unable to paste text with new line on Android.
## [2.2.7] - 2024-02-21
### Fixed

14
dist/squire-raw.js vendored
View file

@ -1909,6 +1909,10 @@
}
let key = event.key;
let modifiers = "";
const code = event.code;
if (/^Digit\d$/.test(code)) {
key = code.slice(-1);
}
if (key !== "Backspace" && key !== "Delete") {
if (event.altKey) {
modifiers += "Alt-";
@ -2044,7 +2048,10 @@
event.preventDefault();
self.undo();
};
keyHandlers[ctrlKey + "y"] = keyHandlers[ctrlKey + "Shift-z"] = (self, event) => {
keyHandlers[ctrlKey + "y"] = // Depending on platform, the Shift may cause the key to come through as
// upper case, but sometimes not. Just add both as shortcuts — the browser
// will only ever fire one or the other.
keyHandlers[ctrlKey + "Shift-z"] = keyHandlers[ctrlKey + "Shift-Z"] = (self, event) => {
event.preventDefault();
self.redo();
};
@ -2226,11 +2233,6 @@
}
_beforeInput(event) {
switch (event.inputType) {
case "insertText":
if (isAndroid && event.data && event.data.includes("\n")) {
event.preventDefault();
}
break;
case "insertLineBreak":
event.preventDefault();
this.splitBlock(true);

14
dist/squire-raw.mjs vendored
View file

@ -1906,6 +1906,10 @@ var _onKey = function(event) {
}
let key = event.key;
let modifiers = "";
const code = event.code;
if (/^Digit\d$/.test(code)) {
key = code.slice(-1);
}
if (key !== "Backspace" && key !== "Delete") {
if (event.altKey) {
modifiers += "Alt-";
@ -2041,7 +2045,10 @@ keyHandlers[ctrlKey + "z"] = (self, event) => {
event.preventDefault();
self.undo();
};
keyHandlers[ctrlKey + "y"] = keyHandlers[ctrlKey + "Shift-z"] = (self, event) => {
keyHandlers[ctrlKey + "y"] = // Depending on platform, the Shift may cause the key to come through as
// upper case, but sometimes not. Just add both as shortcuts — the browser
// will only ever fire one or the other.
keyHandlers[ctrlKey + "Shift-z"] = keyHandlers[ctrlKey + "Shift-Z"] = (self, event) => {
event.preventDefault();
self.redo();
};
@ -2223,11 +2230,6 @@ var Squire = class {
}
_beforeInput(event) {
switch (event.inputType) {
case "insertText":
if (isAndroid && event.data && event.data.includes("\n")) {
event.preventDefault();
}
break;
case "insertLineBreak":
event.preventDefault();
this.splitBlock(true);

11
dist/squire.js vendored

File diff suppressed because one or more lines are too long

6
dist/squire.js.map vendored

File diff suppressed because one or more lines are too long

11
dist/squire.mjs vendored

File diff suppressed because one or more lines are too long

6
dist/squire.mjs.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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,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"}
{"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,IAuD7D,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;AA4GF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}

View file

@ -1,6 +1,6 @@
{
"name": "squire-rte",
"version": "2.2.7",
"version": "2.2.8",
"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",