So, I created a div where I put the buttons inside and used the “clearfix” class on the parent div. This seemed to solve the jumping out button.
I finalized the project. Check it out a provide feedback please
One thing that I have not implemented, but would like to do, is provide sort of a “toast notification” when the text is copied.
I’m using the https://clipboardjs.com/ library for the copy button. But Safari does not fully support this. That’s way they recomend:
That means you can show a tooltip saying Copied! when success event is called and Press Ctrl+C to copy when error event is called because the text is already selected.