X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/616f252b4f00ddd0da4ed6bd130c21579f46a6f9..141cd657f2d6a583113b84978215f29ad97bb70d:/forum/skins/default/media/js/osqa.main.js?ds=sidebyside diff --git a/forum/skins/default/media/js/osqa.main.js b/forum/skins/default/media/js/osqa.main.js index 0122c25..2cae49e 100644 --- a/forum/skins/default/media/js/osqa.main.js +++ b/forum/skins/default/media/js/osqa.main.js @@ -197,8 +197,15 @@ function show_dialog (extern) { copy_id = ' id="copy_clip_button"' } - if (options.event != undefined) { + if (options.event != undefined && options.event.pageX != undefined && options.event.pageY != undefined) { options.pos = {x: options.event.pageX, y: options.event.pageY}; + } else if (options.event.currentTarget != undefined) { + var el = jQuery("#" + options.event.currentTarget.id); + var position = el.offset(); + options.pos = { + x: position.left, + y: position.top + } } var html = '