fix: Fix DOMElement#onShow, Node#show, hide (#470)#471
fix: Fix DOMElement#onShow, Node#show, hide (#470)#471panarch wants to merge 1 commit intoFamous:developfrom
Conversation
DOMElement.onShow should not update display property to block when its node.isShown() is false
There was a problem hiding this comment.
Ideally this._shown shouldn't be set here at all. Instead node._setShown(true); should be called in Dispatch#show.
Currently, although Dispatch#show calls Node#onShow and DOMElement#onShow, it does not affect Node#_shown because Dispatch does not call Node#show. And it's same in case of Dispatch#hide But in this time, if you want to fix not only for the issue I suggested, but also change the current structure to fit the assumption, I have an another idea. I think it is not possible to fit the assumption in current structure because actual Node#_shown state is more than two;
It seems... first one might be more intuitive... hmm.. may be not, anyway. The main key point would be this: I think my PR can be thought as a hotfix to simply fix this without touching the current structure. |
DOMElement.onShow should not update display property to block when its node.isShown() is false