How to paste into a form element in the browser widget
Mark Waddingham
mark at livecode.com
Tue Dec 14 07:04:38 EST 2021
On 2021-12-14 11:41, Tore Nilsen via use-livecode wrote:
> I have a problem pasting into a form element on a web page in the
> browser widget. This works well in the IDE, but not in a standalone
> application. The application has no menus, but I have included a
> pasteKey script to handle paste shortcuts. This does not seem to do
> the trick in the browser widget. I have tried to put the script in the
> stack script, the card script and even in the widget itself, although
> I wouldn’t expect the latter to work. Are there anyone who has run
> across this problem before and may offer a solution?
I think you'll need to include an Edit menu with the normal shortcuts
(Cut/Copy/Paste) - make sure the tag of the items is correct as the
engine uses those to map them to the internal (Cocoa) references. e.g.
(Cu&t /X|cut
(&Copy /C|copy
(&Paste /V|paste
Cocoa-based controls (which the browser widget uses the WebView variant
of) don't respond to shortcuts directly, but only via menu item
accelerators - so the browser widget needs the menu items present for
such shortcuts to work.
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list