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

🐛 Koenig - Fixed "Retry" link in embed card error message

refs https://github.com/TryGhost/Ghost/issues/9724
- `element.contains(target)` was not reliably picking up the `<span>` inside the `<button>` element
- added a fallback that searches the event path for the card component's ID
This commit is contained in:
Kevin Ansfield 2018-07-17 17:02:36 +01:00
parent 8a76e5346a
commit 62d626a9fd

View file

@ -259,6 +259,7 @@ export default Component.extend({
// check if the click was in the card, on the plus menu, or on a modal // check if the click was in the card, on the plus menu, or on a modal
if (this.element.contains(target) if (this.element.contains(target)
|| path.find(searchPath(`#${this.element.id}`))
|| path.find(searchPath('[data-kg="plus-menu"]')) || path.find(searchPath('[data-kg="plus-menu"]'))
|| path.find(searchPath('.liquid-destination'))) { || path.find(searchPath('.liquid-destination'))) {
return; return;