Hi, Please find the attached patch to fix the RM #2489: Copy from the results grid is extremely slow and fails with large datasets.
Thanks, Khushboo
diff --git a/web/pgadmin/static/js/selection/clipboard.js b/web/pgadmin/static/js/selection/clipboard.js index 9794ae7..844e20c 100644 --- a/web/pgadmin/static/js/selection/clipboard.js +++ b/web/pgadmin/static/js/selection/clipboard.js @@ -46,15 +46,17 @@ define(['sources/gettext', 'alertify'], function (gettext, alertify) { textArea.select(); - try { - document.execCommand('copy'); - } catch (err) { - alertify.alert( - gettext('Error'), - gettext('Oops, unable to copy to clipboard')); - } - - document.body.removeChild(textArea); + $(textArea).on('select', function(){ + try { + document.execCommand('copy'); + } catch (err) { + alertify.alert( + gettext('Error'), + gettext('Oops, unable to copy to clipboard')); + } + + document.body.removeChild(textArea); + }); }, }; return clipboard;