0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Koenig - Fixed card context menus sometimes being misplaced

refs https://github.com/TryGhost/Ghost/issues/9505
- sometimes the toolbar was not in a state to measure correctly during `didInsertElement` so the positioning was incorrect
- fixed by re-calculating width/height each time we want to show the toolbar
This commit is contained in:
Kevin Ansfield 2018-04-25 15:11:45 +01:00
parent a0169adbbc
commit ec65fc890b

View file

@ -172,6 +172,8 @@ export default Component.extend({
_showToolbar() {
// only show a toolbar if we have one
if (this.get('toolbar')) {
this._setToolbarProperties();
if (!this.get('showToolbar') && !this._onMousemoveHandler) {
this._onMousemoveHandler = run.bind(this, this._handleMousemove);
window.addEventListener('mousemove', this._onMousemoveHandler);