1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-22 10:54:46 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Jeremy Ruston
b034587390 Alternative fix 2024-07-15 16:59:28 +01:00
Jeremy Ruston
3372eb3ba6 Revert "Initial Commit"
This reverts commit 25edf0e212.
2024-07-09 21:04:54 +01:00
Jeremy Ruston
b878feca59 Merge branch 'master' into fix-typing-closed-tiddler 2024-07-09 20:58:06 +01:00
Jeremy Ruston
25edf0e212 Initial Commit 2024-07-06 18:08:13 +01:00

View File

@@ -82,6 +82,10 @@ ClassicStoryView.prototype.remove = function(widget) {
removeElement = function() {
widget.removeChildDomNodes();
};
// Blur the focus if it is within the descendents of the node we are removing
if($tw.utils.domContains(targetElement,targetElement.ownerDocument.activeElement)) {
targetElement.ownerDocument.activeElement.blur();
}
// Abandon if the list entry isn't a DOM element (it might be a text node)
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
removeElement();