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:
parent
a0169adbbc
commit
ec65fc890b
1 changed files with 2 additions and 0 deletions
|
@ -172,6 +172,8 @@ export default Component.extend({
|
||||||
_showToolbar() {
|
_showToolbar() {
|
||||||
// only show a toolbar if we have one
|
// only show a toolbar if we have one
|
||||||
if (this.get('toolbar')) {
|
if (this.get('toolbar')) {
|
||||||
|
this._setToolbarProperties();
|
||||||
|
|
||||||
if (!this.get('showToolbar') && !this._onMousemoveHandler) {
|
if (!this.get('showToolbar') && !this._onMousemoveHandler) {
|
||||||
this._onMousemoveHandler = run.bind(this, this._handleMousemove);
|
this._onMousemoveHandler = run.bind(this, this._handleMousemove);
|
||||||
window.addEventListener('mousemove', this._onMousemoveHandler);
|
window.addEventListener('mousemove', this._onMousemoveHandler);
|
||||||
|
|
Loading…
Add table
Reference in a new issue