When doing custom handlePaste, do we need the meta tags?

according to PM’s doPaste, there are a couple of meta tags stuck onto the transaction before it is dispatched tr.scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste"). When we are creating our own overrides, is this information necessary? Moreover, what is this meta data used for?

It can be used by code that inspects the transaction to recognize it as a paste. There doesn’t seem to be any code in the core libraries that uses this, but it’d be possible for 3rd party code to respond to different user events differently (for example when determining whether to close an autocompletion menu or similar).

1 Like