FIX: if quoting ends with link, quote reply does not show up

This commit is contained in:
Sam 2014-10-02 15:24:11 +10:00
parent 2d12451ab1
commit 890346f0b0

View file

@ -48,9 +48,14 @@ export default Discourse.View.extend(AddCategoryClass, Discourse.Scrolling, {
});
this.$().on('mouseup.discourse-redirect', '.cooked a, a.track-link', function(e) {
var selection = window.getSelection && window.getSelection();
// bypass if we are selecting stuff
if (selection.type === "Range" || selection.rangeCount > 0) { return true; }
var $target = $(e.target);
if ($target.hasClass('mention') || $target.parents('.expanded-embed').length) { return false; }
return Discourse.ClickTrack.trackClick(e);
});
}.on('didInsertElement'),