Onpaste event not working

3 Please refer lightning:input. onpaste event (attribute) is not available for lightning:input. If you need such functionality, you may go for ui:inputText component and add your desired slds-class. Refer Events section in the following resource ui:inputText Share Improve this answer Follow answered Dec 26, 2017 at 11:34 A.Bretto 492 6 19.

I originally tried adding the onpaste event to the TD elements themselves, but this did not work at all. So instead, I added the event to the table element and just check to make sure that the focused element is a TD and then paste the data to that element:.





The paste event is fired when the user has initiated a "paste" action through the browser's user interface.. If the cursor is in an editable context (for example, in a <textarea> or an element with contenteditable attribute set to true) then the default action is to insert the contents of the clipboard into the document at the cursor position..


May 02, 2017 · Invoke the method in the HTMLElementEvents::onpaste event to execute custom paste code. Inserts the data from the system clipboard into the specified location on the document. To invoke this event, do one of the following: Right-click to display the shortcut menu and select Paste. Or press CTRL+V..