renato
(Renato Atilio)
June 23, 2023, 1:39pm
3
This is where this is currently defined:
if (this.siteSettings.enable_fast_edit) {
this.set(
"_canEditPost",
this.topic.postStream.findLoadedPost(postId)?.can_edit
);
if (this._canEditPost) {
const regexp = new RegExp(escapeRegExp(quoteState.buffer), "gi");
const matches = cooked.innerHTML.match(regexp);
const non_ascii_regex = /[^\x00-\x7F]/;
if (
quoteState.buffer.length < 1 ||
quoteState.buffer.includes("|") || // tables are too complex
quoteState.buffer.match(/\n/g) || // linebreaks are too complex
matches?.length > 1 || // duplicates are too complex
non_ascii_regex.test(quoteState.buffer) // non-ascii chars break fast-edit
) {
this.set("_isFastEditable", false);
this.set("_fastEditInitialSelection", null);
This file has been truncated. show original
I believe that in your test you hit the “duplicates are too complex” condition, like Michael said. It also uses the full editor if tables, line breaks or non-ascii characters are involved.