FrameControl throws Uncaught TypeError during hidePopUp and doesn't hide
Closed this issue · 0 comments
Describe the bug
The 6.4x player works great, but the frameControl plugin (any any TimeLinePlugin button with a popup?) throws "Uncaught TypeError: Cannot read property 'plugin' of undefined" inside "container.plugin.willHideContent()".
The TimeLine plugins are registered to TimeLinePluginContainer and not the PopUpPluginContainer. The hidePopUp() calls hideContainer() first on the PopUpPluginContainer then on TimeLinePluginContainer. The button is not associated to a PopUpPluginContainer, and exception is thrown. The TimeLinePluginContainer hideContainer() is never called (see snippet below).
hidePopUp(identifier,button,swapFocus=true) {
this.popUpPluginContainer.hideContainer(identifier,button,swapFocus); <-- throws uncaught exception
this.timeLinePluginContainer.hideContainer(identifier,button,swapFocus); <--- never gets here
}
The result is that the frameControl popup never closes.
To Reproduce
Steps to reproduce the behavior:
- Go to any v6.4.2 or 6.4.3 Paella player with slides (i.e. https://paellaplayer.upv.es/paella/player-6.4.2/?id=belmar-hls)
- Click on the frameControl plugin button and notice the slides show in the time line bar.
- Click on the frameControl plugin button to close it.
- The frameControl does not close, the slides popup remains visible. The uncaught exception shows in the console log.
Workaround (if any)
Possibly, to change PopUpContainer hideContainer() (05_plugin_base.js) code to check for undefined container the same way that is done in its showContainer().
class PopUpContainer extends paella.DomNode {
....
hideContainer(identifier, button, swapFocus = false) {
var container = this.containers[identifier];
hideContainer.apply(this,[identifier,container,swapFocus]);
}
showContainer(identifier, button, swapFocus = false) {
var container = this.containers[identifier];
if (container && this.currentContainerId!=identifier && this.currentContainerId!=-1)
var prevContainer = this.containers[this.currentContainerId];
hideContainer.apply(this,[this.currentContainerId,prevContainer,swapFocus]);
showContainer.apply(this,[identifier,container,button,swapFocus]);
}
else if (container && this.currentContainerId==identifier) {
hideContainer.apply(this,[identifier,container,swapFocus]);
}
else if (container) {
showContainer.apply(this,[identifier,container,button,swapFocus]);
}
}
Environment Information
- OS: MacOSx
- Browser = Chrome
- Browser Version latest
- Paella version 6.4.2, 6.4.3