mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-22 15:06:52 +00:00
Alternative fix
This commit is contained in:
parent
3372eb3ba6
commit
b034587390
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user