mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fix tiddlers should not be interactive after being closed (#8344)
* Initial Commit
* Revert "Initial Commit"
This reverts commit 25edf0e212
.
* Alternative fix
This commit is contained in:
parent
bd936e2b7d
commit
b48be91ec5
@ -82,6 +82,10 @@ ClassicStoryView.prototype.remove = function(widget) {
|
|||||||
removeElement = function() {
|
removeElement = function() {
|
||||||
widget.removeChildDomNodes();
|
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)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
removeElement();
|
removeElement();
|
||||||
|
Loading…
Reference in New Issue
Block a user