vscode-objectscript
vscode-objectscript copied to clipboard
Unable to copy/paste into CSP extension pages on Mac
The copy and paste commands don't work in inputs on a Studio extension that is a CSP page loaded within VS Code. This only occurs on Mac.
VS Code ObjectScript extension version: 1.0.12 VS Code version: 1.52.2
VS Code 1.52.2 is getting a bit old. Current release is 1.57. Can you update and retest?
Hi John, the user updated to the latest version and is experiencing the same error.
Version: 1.57.0 Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c Date: 2021-06-09T17:22:31.215Z Electron: 12.0.9 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Darwin x64 19.6.0
@isc-pbarton please create a minimal repro and upload here whatever needs to be installed on the server. Bonus points for a short MP4 or animated GIF that illustrates (hint - Developer: Toggle Screencast Mode command before recording to reveal your keystrokes)
The underlying issue may be a VS Code one, especially since you only see it when running VS Code on macOS.
Following are minimal steps to reproduce.
Add a Studio Source Control class to the namespace (replace /csp/pbarton/ with the default CSP application for the namespace.)
Class Studio.SourceControl.Example Extends %Studio.SourceControl.Base
{
Method UserAction(Type As %Integer, Name As %String, InternalName As %String, SelectedText As %String, ByRef Action As %String, ByRef Target As %String, ByRef Msg As %String, ByRef Reload As %Boolean) As %Status
{
Set Action=2
Set Target="/csp/pbarton/test.csp"
Quit $$$OK
}
}
Add this "test.csp" file to the default CSP application:
<html>
<body>
Test page with form input
<form>
<textarea cols=90 rows=8></textarea>
</form>
</body>
</html>
On the server, go to System -> Source Control Settings and select Studio.SourceControl.Example as the source control class for the namespace.
Finally connect to the namespace with VS Code ObjectScript. Open up a class file. From the Command Palette run "ObjectScript: Server Source Control", then select "Add to Source Control". This will open up the "test.csp' page in a web pane. Try to copy and paste into the text area. On Mac, the keyboard shortcuts do not work.
I've also attached a screen capture as recommended.
https://user-images.githubusercontent.com/9560941/122275467-b9ff9480-ceb1-11eb-80f4-de6b2d98b02c.mp4
Thanks for the detailed steps which meant I was able to reproduce the problem. Like you said, it happens on macOS but not on Windows. I didn't test on Linux VS Code. I think it's probably related to how the CSP template page gets run in an iframe within a VS Code Webview, which itself places its contents in an iframe.
Do you know if this problem has always existed? Or did it appear after a recent VS Code update?
@gjsjohnmurray I verified that this is still a bug. Would a possible solution be to use the VS Code simple browser instead of an iframe in a Webview?
@isc-bsaviano if you use this button in Server manager to launch Portal in Simple Browser, can you paste?

@gjsjohnmurray The simple browser isn't working for me at all. It takes forever to load, then when I see the SMP login page I can't paste into either input box and clicking "login" has no effect. I am using a new IRIS so it's possible that there's some server-side setting that I need to change that I'm forgetting.
@isc-bsaviano there's a section in the Server Manager README about changes required in order that Simple Browser can access Portal.
@gjsjohnmurray I still can't copy-paste into a simple browser.
I have verified that this is still not working, but since there's nothing for us to do in this extension I'm going to close the issue. I will open one on the VS Code repository shortly