From 831ff42101ba3d4fbfd42a367ec79b99e244248d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 22 Aug 2018 11:52:20 +0530 Subject: [PATCH] Stop event bubbling on clicking edit item --- erpnext/public/js/hub/pages/publish.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/hub/pages/publish.js b/erpnext/public/js/hub/pages/publish.js index f49365833e6..50d6e3c463e 100644 --- a/erpnext/public/js/hub/pages/publish.js +++ b/erpnext/public/js/hub/pages/publish.js @@ -74,13 +74,18 @@ erpnext.hub.Publish = class Publish extends SubPage { this.make_publishing_dialog(); + this.$wrapper.on('click', '[data-route]', (e) => { + e.stopPropagation(); + const $target = $(e.currentTarget); + const route = $target.data().route; + frappe.set_route(route); + }); + this.$wrapper.on('click', '.hub-card', (e) => { const $target = $(e.currentTarget); const item_code = $target.attr('data-id'); this.show_publishing_dialog_for_item(item_code); - this.$current_selected_card = $target.parent(); - }); }