Questions tagged [onpaste]
48 questions
1
vote
3 answers
How to add onpaste event in frame in IE with javascript?
I want to handle the paste event after clicking right right and select Paste in IE. As an example i did this:
parent.document.frames["myframe"].document.attachEvent('onclick', function(e) {
alert("paste");
});
and it works ok. But when I add…

novellino
- 1,069
- 4
- 22
- 51
1
vote
2 answers
How to simulate Paste in a WPF TextBox?
I have a TextBox in my WPF application which I've added a Paste event to using:
DataObject.AddPastingHandler(elm, new DataObjectPastingEventHandler(OnPaste));
Now I want to trigger the OnPaste event from C# code. How can I do this? I tried calling…

stiank81
- 25,418
- 43
- 131
- 202
1
vote
2 answers
setTimeout and e.preventDefault
I have two events listening on a unique field: autocomplete and onPaste.
My goal is to call another logic on paste, and use the autocomplete on typing.
I did this in the following way:
$("#refno").on('paste', function (e) {
setTimeout(function…

Milos Cuculovic
- 19,631
- 51
- 159
- 265
1
vote
1 answer
jQuery: Submit form on paste
A data entry person is putting email address into a form and it would be helpful if the form submitted each time he pasted in an address so it would be ready for the next paste. Other code within the setTimeout also works fine--just not the form…

Mike C
- 79
- 1
- 6
1
vote
1 answer
onpaste event replaces text in textbox
I have an issue with the onpaste event in JS.
I need to copy the clipboard content into two text boxes by splitting it into half. I am using the code below:
function paste(){
document.getElementById("txt1").value =…

Nikhil
- 31
- 3
0
votes
0 answers
onPaste not getting triggered for div in sweetalert modal
I have a react component where you can paste screenshots from the clipboard. The implementation is like I have a div which is focusable using tabIndex. When user focuses on it and paste copied image it is shown in the DOM. The issue is this…

Mitesh Choudhary
- 3
- 3
0
votes
2 answers
How to have JS onpaste event work with Rails form?
I have a search form, and would like it so that when I paste something into the form, it automatically submits the form. I would also like to retain functionality so if I don't paste something, and rather manually type it, that I have to press…

Mislav Rukonic
- 45
- 6
0
votes
1 answer
Filter out HTML Tag onpaste for div and oncopy too
I have an editable DIV in my site to send a forum message. People can edit their messages (Bold, Italic, underline, add links and more)
But I want when some one paste or drop (- drop is not necessary, but paste it is) their text I want it to go in…

Gama Sharma
- 51
- 1
- 7
0
votes
1 answer
On apple iphone what event is captured on tap of a notification?
I have a React application. I am testing on apple mobile phone. My problem is that when I receive a SMS, I get the number as suggestion above keyboard. When I tap on it, I need that number to be filled on an OTP input box. So what is the event…

Bijoy valappil
- 139
- 2
- 12
0
votes
1 answer
.onpaste event check the max length and if text is bigger put the extra textvalue on next lines
I use this code for now :
for (var i = 0; i < all_local_cell.length; i++) {
var td = all_local_cell[I]; //number of textfield cells
td.onpaste = function (e) {
var target = e.srcElement;
var Max_Length = 8;
var length = this.value.length;
if…

511
- 5
- 6
0
votes
2 answers
Adding an onpaste event to a dijit/Editor
I have an application that contains a large number of digit/Editors created declaratively. I need to add an onpaste event to these editors in order to convert the pasted content to plain text before pasting. I am having trouble getting the event to…

Becca D
- 13
- 4
0
votes
1 answer
ReactJS onPaste event: how to determine if user has selected some of textarea's existing content
I'm trying to re-create native textarea behavior in reactjs. Specifically, I'd like a user to be able to select/highlight some of the textarea's existing text, then paste new text over the selection.
My current react onPaste event…

Ghan
- 797
- 8
- 28
0
votes
1 answer
Read the text on ONPaste Event in gwt
I am facing problem to get text on ONPASTE event. Suppose i have 5 textboxes and i am using sinkEvent then how would i get the text which going to be pasted in any of the textbox
public abc() {
super();
TextBox t1 = new TextBox();
…

Kushal Jain
- 3,029
- 5
- 31
- 48
0
votes
1 answer
onkeypress="return false;" onpaste="return false;"
I have a Website that does not allow me to paste in the search dates. It has set """ onkeypress="return false;" onpaste="return false;" """ on the date field.
I am looking for workarounds to implement date picker in python + selenium rather than…

myloginid
- 1,463
- 2
- 22
- 37
0
votes
0 answers
onpaste calling a function javascript/jQuery
I am trying to call a function when something is pasted into a field.
Because I am using ext.net, I can not hardcode the function into the onpaste. This is why I am setting it from js.…

starvator
- 989
- 1
- 11
- 26