Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow copying from the JSON button dialog #1501
Previously the copy button on the JSON modal would not copy the text of
There was an additional performance problem that went into the problem.
Previously the copy button on the JSON modal would not copy the text of the modal into the clipboard. This was because by default Bootstrap Modals demand focus, and clipboard js works by creating a hidden text field and copying the text out of that. The fix is allowing the modal to yield focus to the hidden text field. There was an additional performance problem that went into the problem. In particular, attaching the clipboard to a class attaches the clipboard to every modal on the page, even when the modal isn't open. Tis was fixed by starting the clipboard only when the modal is open and destroying it after the modal is closed, to prevent attaching many handlers that accumulate on the page.