检测到源自 Flash TextField 中默认上下文菜单的粘贴事件

发布于 2024-09-25 09:25:40 字数 107 浏览 0 评论 0原文

文本字段当前不调度粘贴事件。 当用户使用键盘快捷键进行粘贴时,有一种方法可以通过侦听文本字段中的各种键盘事件来解决该缺点。

有没有办法在粘贴事件源自上下文菜单上的单击时检测到该事件?

Textfields currently do not dispatch paste events.
When the user is using keyboard shortcuts to paste, there's a way to workaround that shortcoming by listening to various keyboard events in the textfield.

Is there a way to detect the paste event when it is originated from a click on the ContextMenu?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

没有心的人 2024-10-02 09:25:40

当您在 ContextMenu 中选择一个项目时,所选的 ContextMenuItem 会调度一个 menuItemSelect 事件。用那个。

When you choose an item in a ContextMenu, the chosen ContextMenuItem dispatches a menuItemSelect event. Use that.

甜味拾荒者 2024-10-02 09:25:40

这么写:

this.stage.addEventListener( Event.PASTE, handlePaste );

然后当您在 Flash Player 的 ContextMenu 中单击“粘贴”时,将调用 handlePaste

Write this :

this.stage.addEventListener( Event.PASTE, handlePaste );

and then when you click on "paste" in the ContextMenu of flash player, the handlePaste is called

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文