I have the following code on my page that displays a text box with a copy button after it(places the contents on your clipboard)...
public showDialog(): DataLab.Util.Promise<IDialogResult> {
var p = DialogViews.ShowApiCode.show(this);
$("#short-code").fxsCopyButton({
ariaLabelledBy: "short-code-label",
labelElement: $("#short-code-input"),
getClipboardText: function () { return $("#short-code-text").val(); }
});
$("#short-code-text").click(function () {
$(this).select();
});
return p;
}
This good works fine in Safari and in Chrome, but in IE the text box is empty. I know that if I remove the following the text books works fine...
$("#short-code").fxsCopyButton({
Is my best option here to do a switch based on the browser and just not do clipboard in IE? Can I am I doing something wrong here, or is there a better way to do copy to clipboard for all browsers?