File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -2335,11 +2335,13 @@ export default class RFB extends EventTargetMixin {
23352335
23362336 _writeClipboard ( text ) {
23372337 if ( this . _viewOnly ) return ;
2338- if ( this . _asyncClipboard . writeClipboard ( text ) ) return ;
2339- // Fallback clipboard
2340- this . dispatchEvent (
2341- new CustomEvent ( "clipboard" , { detail : { text : text } } )
2342- ) ;
2338+ if ( ! ( this . _asyncClipboard . writeClipboard ( text ) ) ) {
2339+ // Fallback clipboard
2340+ this . dispatchEvent (
2341+ new CustomEvent ( "clipboard" , { detail : { text : text } } )
2342+ ) ;
2343+ }
2344+ this . dispatchEvent ( new CustomEvent ( "clipboardreceived" ) ) ;
23432345 }
23442346
23452347 _handleServerCutText ( ) {
Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ protocol stream.
9696 - The ` clipboard ` event is fired when clipboard data is received from
9797 the server.
9898
99+ [ 'clipboardreceived'] ( #clipboardreceived )
100+ - The ` clipboardreceived ` event is fired after the ` clipboard ` event
101+ or after the clipboard has been updated through the
102+ [ Clipboard module] ( API-internal.md#11-module-list ) . The copied text
103+ has already been written to the system clipboard or the clipboard panel.
104+
99105[ ` clippingviewport ` ] ( #clippingviewport )
100106 - The ` clippingviewport ` event is fired when ` RFB.clippingViewport ` is
101107 updated.
You can’t perform that action at this time.
0 commit comments