Merge pull request #2795 from lidlanca/fix-link-release

Fix: Cancel link click if triggered as part of text selection
This commit is contained in:
Sam 2014-09-19 13:35:13 +10:00
commit 14936ed9c9

View file

@ -14,6 +14,7 @@ Discourse.ClickTrack = {
@param {jQuery.Event} e The click event that occurred @param {jQuery.Event} e The click event that occurred
**/ **/
trackClick: function(e) { trackClick: function(e) {
if (Discourse.Utilities.selectedText()!=="") return false; //cancle click if triggered as part of selection.
var $link = $(e.currentTarget); var $link = $(e.currentTarget);
if ($link.hasClass('lightbox')) return true; if ($link.hasClass('lightbox')) return true;