Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
🐝 🐜 '+' button double click bug (#589)
Browse files Browse the repository at this point in the history
refs TryGhost/Ghost#8106

When a user clicks on the plus button it opens the card menu, when they click on it twice the card menu input field loses focus and the card menu closes, because the Range object of the document is no longer within the editor the '+' button also disappears. This has the effect of making the '+' button disapear when double clicking.

Now when the input field to search cards loses focus the card menu disapears but the '+' button remains, we rely on the cursorDidChange event to also hide the button.
  • Loading branch information
disordinary authored and kevinansfield committed Mar 16, 2017
1 parent 5b494a0 commit b618412
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/gh-koenig/addon/components/koenig-plus-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default Component.extend({

input.blur(() => {
window.setTimeout(() => {
this.send('closeMenu');
this.send('closeMenuKeepButton');
}, 200);
});

Expand Down Expand Up @@ -165,8 +165,11 @@ export default Component.extend({
this.set('isOpen', false);
this.set('isButton', false);
},
closeMenuKeepButton: function () { // eslint-disable-line
this.set('isOpen', false);
},
updateSelection: function (event) { // eslint-disable-line
alert(event);
// alert(event);
}
}
});

0 comments on commit b618412

Please sign in to comment.