discourse/app/assets/javascripts
David Battersby 5d8632d484
FIX: fallback to composer for non ascii characters (#21465)
The problem
When selecting text and clicking the "Edit" button that pops up, this opens up the Fast Edit dialog.

The fast edit feature doesn't work well with non standard characters (non-ascii). If the user selects a string of text that contains non-ascii characters, sometimes they won't save. It is non-obvious to the user why this is happening. This issue occurs more frequently when editing content that is written in non-english languages, as fast-edit doesn't work well with non-ascii characters. We currently do a global replace on a couple of the more obvious quotation marks when the fast edit dialog attempts to save, but there are too many edge cases for foreign language content.

The solution
We can fix this issue by using a catch-all approach for non-ascii characters before the user clicks the edit button to bring up the fast edit dialog. Then we can fallback to the full composer to edit their text, which has much better support for non-ascii characters.

What does this regex do?
The regex used matches any character that is not within the ASCII range of 0x00 to 0x7F, which includes all control characters and non-ASCII characters.

This regex pattern can be used to match any character that is not a standard ASCII character, such as accented characters, non-Latin characters, and special symbols.
2023-05-10 12:38:28 +08:00
..
admin Build(deps): Bump ember-source in /app/assets/javascripts 2023-05-05 12:56:24 +01:00
bootstrap-json Build(deps): Bump jsdom from 21.1.1 to 22.0.0 in /app/assets/javascripts (#21350) 2023-05-08 11:45:28 +02:00
confirm-new-email DEV: Add error message styling (#21225) 2023-04-25 08:40:18 -04:00
dialog-holder Build(deps): Bump webpack in /app/assets/javascripts (#21376) 2023-05-04 10:51:39 +02:00
discourse FIX: fallback to composer for non ascii characters (#21465) 2023-05-10 12:38:28 +08:00
discourse-common Build(deps): Bump ember-source in /app/assets/javascripts 2023-05-05 12:56:24 +01:00
discourse-hbr Build(deps): Bump ember-source in /app/assets/javascripts 2023-05-05 12:56:24 +01:00
discourse-plugins Build(deps): Bump @babel/core in /app/assets/javascripts (#21349) 2023-05-04 11:30:57 +02:00
discourse-widget-hbs Build(deps): Bump ember-source in /app/assets/javascripts 2023-05-05 12:56:24 +01:00
docs
ember-addons
ember-cli-progress-ci DEV: Add progress output in CI during ember-cli build (#17977) 2022-08-17 22:39:52 +01:00
ember-production-deprecations DEV: Include ember deprecation messages in production builds (#20587) 2023-03-10 10:37:28 +00:00
locales UX/DEV: Review queue redesign fixes (#20239) 2023-03-02 16:40:53 +01:00
patches DEV: Update ember-cli to 4.12.0 (#21074) 2023-04-19 12:58:29 +02:00
pretty-text Build(deps): Bump ember-source in /app/assets/javascripts 2023-05-05 12:56:24 +01:00
select-kit A11Y: Improve select-kit accessibility (#21400) 2023-05-09 09:46:05 -04:00
truth-helpers Build(deps): Bump ember-source in /app/assets/javascripts 2023-05-05 12:56:24 +01:00
wizard Build(deps): Bump ember-source in /app/assets/javascripts 2023-05-05 12:56:24 +01:00
.licensee.json Revert "DEV: Merge package.json files (#21172)" (#21182) 2023-04-20 14:57:40 +02:00
.npmrc
discourse-js-processor.js DEV: Update ember-cli-htmlbars to 6.2.0 (#20467) 2023-02-27 18:43:28 +01:00
handlebars-shim.js
package.json DEV: Move app build-time dependencies to devDependencies (#21310) 2023-05-03 09:25:13 +01:00
polyfills.js Drop support for iOS < 15.7 (#19847) 2023-01-16 17:28:59 +00:00
service-worker.js.erb FIX: Service worker for Safari (#21435) 2023-05-09 18:36:20 +03:00
yarn.lock Build(deps-dev): Bump terser in /app/assets/javascripts (#21444) 2023-05-09 11:12:38 +02:00