This commit is contained in:
Mirco Wittrien 2020-05-23 16:35:29 +02:00
parent b63e04b592
commit 7a9d6db733
3 changed files with 15 additions and 7 deletions

View File

@ -3361,11 +3361,19 @@
else return [contextMenu.props.children[i].props.children, parseInt(j)];
}
}
else if (contextMenu.props.children[i] && contextMenu.props.children[i].props && check(contextMenu.props.children[i].props.children)) {
if (config.group) return [contextMenu.props.children, parseInt(i)];
else {
contextMenu.props.children[i].props.children = [contextMenu.props.children[i].props.children];
return [contextMenu.props.children[i].props.children, 0];
else if (contextMenu.props.children[i] && contextMenu.props.children[i].props) {
if (check(contextMenu.props.children[i].props.children)) {
if (config.group) return [contextMenu.props.children, parseInt(i)];
else {
contextMenu.props.children[i].props.children = [contextMenu.props.children[i].props.children];
return [contextMenu.props.children[i].props.children, 0];
}
}
else if (contextMenu.props.children[i].props.children && contextMenu.props.children[i].props.children.props && BDFDB.ArrayUtils.is(contextMenu.props.children[i].props.children.props.children)) {
for (let j in contextMenu.props.children[i].props.children.props.children) if (check(contextMenu.props.children[i].props.children.props.children[j])) {
if (config.group) return [contextMenu.props.children, parseInt(i)];
else return [contextMenu.props.children[i].props.children.props.children, parseInt(j)];
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -161,7 +161,7 @@ var SpellCheck = (_ => {
// Begin of own functions
onSlateContextMenu (e) {
let [SCparent, SCindex] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "spellcheck"});
let [SCparent, SCindex] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "spellcheck", group:true});
if (SCindex > -1) SCparent.splice(SCindex, 1);
let textarea = BDFDB.DOMUtils.getParent(BDFDB.dotCN.textarea, e.instance.props.target), word = null;
if (textarea) for (let error of textarea.parentElement.querySelectorAll(BDFDB.dotCN._spellcheckerror)) {