From b7a8240bbcf8ab16514e1e4ce044c7e3896f73b6 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Wed, 23 Mar 2016 23:51:12 +0500 Subject: [PATCH] tune profile modals openning --- js/interface_common.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/interface_common.js b/js/interface_common.js index ff50e72..5e46730 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -789,6 +789,12 @@ function addToCommonDMsList(list, targetAlias, message) { list.append(item); } +function handleClickOpenProfileModal(event) { + muteEvent(event, true); + event.data = {route: $(event.target).attr('href')}; + routeOnClick(event); +} + function openConversationClick(event) { event.preventDefault(); event.stopPropagation(); @@ -2266,7 +2272,7 @@ function initInterfaceCommon() { else $('.undo-unicode').on('click', undoLastUnicode); - $('.open-profile-modal').on('click', muteEvent); + getElem('.open-profile-modal', true).on('click mouseup', handleClickOpenProfileModal); //$('.open-hashtag-modal').on('click', openHashtagModal); //$('.open-following-modal').on('click', openFollowingModal); $('.userMenu-connections a').on('click', openMentionsModal);