Fixed a bug on popup opening from sidebar