Flash used to be the only thing that worked, cross-browser.
Chrome, I know for sure, changed their minds several times on whether they would allow it...security model thing, you could make it work only by tweaking some internal chrome setting.
The sales pitch at https://clipboardjs.com/ makes it sound like perhaps things have changed enough that a reasonable cross-browser solution is possible now.