Alright zeroclipboard experts, I need so开发者_StackOverflow社区me help. I have a popup context menu and I press a button on that menu to copy some text. This works fine the first time. However, when I open the menu in another place, the flash file no longer copies the text to the clipboard.
The flash movie is appearing in the correct position and disappearing correctly when the menu is closed, but it is not copying the text to the clipboard. In fact, it is copying '' to the clipboard.
Any help with how to fix this/why this is happening would be appreciated.
Alright, I found the problem. It turns out that because I was destroying the context menu, zeroclipboard was confused, even though it still acted as though it was glued to the new button with the same id.
What you need to do is destroy() the old zeroclipboard and set it equal to a new ZeroClipboard.Client(), re-glue() the clipboard, and re-create the event listeners.
精彩评论