fixes double hashes in share links

v1.18.x
Baris Soner Usakli 11 years ago
parent acafa9095f
commit cd9bd91ab2

@ -484,7 +484,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
$('#post-container').on('shown.bs.dropdown', '.share-dropdown', function() {
var pid = $(this).parents('.post-row').attr('data-pid');
$('#post_' + pid + '_link').val(window.location.href + "#" + pid);
$('#post_' + pid + '_link').val(window.location.protocol + '//' + window.location.host + window.location.pathname + '#' + pid);
// without the setTimeout can't select the text in the input
setTimeout(function() {
$('#post_' + pid + '_link').putCursorAtEnd().select();

Loading…
Cancel
Save