48 questions
0
votes
1
answer
91
views
How can I get on:paste to work with `web_sys`?
For the project I want the verification code part of the sign up stepper to have each number separated into small boxes and when pasted the code will be pasted into each individual box. The problem is ...
1
vote
0
answers
46
views
onPaste converts the pasted file type to image
I am looking into solution when users can copy paste any file in order to upload it.
I am using onPaste and when I console log on the event.clipboardData.files, I see that all the details within files ...
1
vote
1
answer
511
views
how use onPaste in antD inputNumber Field to prevent input other than integers
I was using antD in my react project, I was using inputNumber Component of antD to get input, all I wanted is integer input and wanted to prevent all the other input from all source such as copy-...
2
votes
0
answers
3k
views
Vuetify v-textarea maxlength on devices
I have vuetify v-textarea in my page and problem with maxlength in it. In web all is good, but on devices when I paste text inside textarea and then typing I pass over maxlength.
<v-textarea
...
0
votes
2
answers
137
views
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 ...
1
vote
1
answer
426
views
How do I stop buttons from blocking an onPaste event
I have an image modal where the user can upload or paste an image.
Both are working great, except currently I have the buttons on the modal capturing the focus, so pasting only works by manually ...
2
votes
1
answer
2k
views
onKeypress in Vue 3 doesn't capture the last character of number
I tried to get the entered number in to a function in Vue with the following code.
<input
type="number"
step="1&...
1
vote
0
answers
733
views
console.dir(event.target.value) is empty string, but console.dir(event) shows a "full string" for the value property
I have an input element with an onPaste event handler. When I paste a string of text (eg "A string I pasted") into the input the event gives me an empty string "" value:
<input ...
3
votes
2
answers
440
views
How to filter insert html from some tags (contenteditable)
I have a tag div with an contenteditable = true attribute.When Paste events happen I want to filter pasted html from some tags.How can i do this ?
1
vote
2
answers
4k
views
How can I paste clipboard data after changing it in react?
I have defined the following event handler for the component
<Editable
onKeyDown={(event) => handleChange(event)
onPaste={(event) => handlePaste(event)}
/>
Within the event handler I'...
1
vote
2
answers
2k
views
How to prevent user from copy-pasting text with invalid characters into input text field immediately on copy-paste action?
I have read few answers online and here on stack overflow but I am not finding a solution.
I am trying to prevent user from copy-pasting invalid characters (anything other than a-z A-Z characters) ...
1
vote
0
answers
676
views
Are PASTE events asynchronous? What is the best way to handle this? [duplicate]
Recently, I noticed a strange behaviour of paste events: the value of an input element is updated after the function is triggered! If you just pass to the function the value itself or event.target....
-2
votes
1
answer
328
views
Is it possible to submit a form with onpaste?
I'm trying to make a form that once you paste something it self submit. I have the following code:
<form>
<textarea onpaste=submit></textarea>
</form>
javascript code I'...
0
votes
1
answer
72
views
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 ...
0
votes
1
answer
279
views
.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 ...
-1
votes
3
answers
680
views
onPaste not recognized as event by HTML5
I'm in the middle of making a user registration form and want to prevent pasting into certain input boxes. Problem is, onPaste isn't being recognized as an event.
As you can see in this image, ...
0
votes
2
answers
663
views
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 ...
1
vote
2
answers
2k
views
Javascript onpaste replaceAll
I want to paste in a textBox and after I paste it, it should replace all spaces with commas.
<!DOCTYPE html>
<html>
<body>
<input id="pc" type="text" contenteditable="true" ...
4
votes
2
answers
3k
views
Ng-Paste - Accessing Pasted Data as an Array or List
The Idea
We're building an app in Angular 1.5.x and we're trying to implement a feature that would allow the user to paste a single column of cells from an excel sheet or any other spreadsheet (single ...
2
votes
1
answer
7k
views
React JS: onPaste not working as expected
I have a simple React component for a textarea that increases its size as the user types into it. The function looks like this:
changeHeight(e) {
const height = this.textarea.clientHeight;
...
4
votes
0
answers
867
views
How can I get the modified value of an input field within the onPaste event?
I'm handling the onPaste event in a React application. The problem I'm having is that the value of the element isn't updated until after the paste event has finished and thus I'm unable to determine ...
0
votes
1
answer
3k
views
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.
...
2
votes
1
answer
3k
views
Paste Image using Javascript onpaste is not working for IE, working with chrome
I am trying to save a image/screenshot through paste Ctrl+V into a div #pasteImageDiv by user. Its working fine with Chrome but not working with IE.
I am using IE10.
Until now, what I have been ...
0
votes
1
answer
448
views
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() {
...
1
vote
2
answers
3k
views
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")....
5
votes
1
answer
2k
views
onpaste / paste event not firing for table on first few attempts
Google Chrome specific - this is an internal-use app that does not require cross-browser compatibility
See http://jsfiddle.net/spetnik/vpcyt4yv/
I have a table into which I am attempting to allow ...
2
votes
1
answer
3k
views
Get clipboard data in ng-paste directive?
I'm using angularjs 1.3.2.
How to get clipboard data on paste event?
This question is like:
"Paste" event in Angular [ngPaste]
But in this question, the angularjs version is 1.2.
And this ...
0
votes
1
answer
746
views
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 ...
0
votes
0
answers
281
views
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.
$('#...
2
votes
2
answers
6k
views
Javascript Jquery on one of the multiple input fields changed
Lets say I have multiple input fields like distance, fuelConsumption, pricePerGallon and I need to calculate total price. But I want to calculate as the user types. So the total price need to be ...
1
vote
1
answer
2k
views
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 ...
3
votes
1
answer
1k
views
how to disable pasting in one of the gwt textbox
I have two textboxes and i want to just disable one of them from pasting anything. I have tried
sinkEvents( Event.ONPASTE );
but it disables both of the textboxes from pasting.
6
votes
4
answers
11k
views
How to receive php image data over copy-n-paste javascript with XMLHttpRequest
I try to make an image-upload functionality similar to the one GMail uses. You copy (CTRL-C) an image from your desktop and paste (CTRL-V) it onto the website.
The image is then uploaded via a ...
2
votes
3
answers
6k
views
Jquery Mobile Paste event on input text
I'm using Jquery Mobile to develop an web app for Android and iPhone. I want to handle the event when the users change their value in the input text field.
Initially, I use .on("keyup change") and ...
4
votes
2
answers
6k
views
Does ie10 support image pasting from clipboard?
Does ie10 support the ability to support copy and pasting an image. IE has the fileReader api which is nice, but it would be cool to have ability to paste a picture.
1
vote
1
answer
2k
views
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(&...
2
votes
1
answer
175
views
retrieving data after right-click paste
I am trying to evaluate some data entered into a textarea after a paste has occurred. When I use onkeyup it detects if fine and does the evaluation okay when the user uses Cntl-V to paste. It does ...
0
votes
0
answers
232
views
Parsing Pasted Text with Jquery (no server side processing)
I need a solution to do the following
User pastes some text into a textarea
User clicks a button "Autofill"
On press of the button, the various lines of the pasted text are put into the ...
4
votes
3
answers
4k
views
HTML: onpaste="doSomething();" as invalid attribute
I am checking my HTML code with Amaya.
I have an error on this line:
<input style="vertical-align:bottom;" type="text" id="doi_id" onkeydown="if (event.keyCode == 13) return false;" onpaste="...
16
votes
3
answers
5k
views
How do you configure Firefox to allow Javascript to intercept a value pasted from the clipboard?
I need to filter out certain characters when a user pastes from the clipboard. (I don't actually want to modify what's in the clipboard.) I already have this working in IE. Sigh...
tl;dr: capability....
10
votes
2
answers
7k
views
How to get the new value of a textarea input field on paste?
I see that when I try to read the value from a textarea field when its onpaste function is called, I get the old value of the field (the one before the paste operation), not the new value (the one ...
13
votes
4
answers
28k
views
jQuery on("paste") for the first time doesn't grab or pass the value
Real deal problem for me, because I have no clue to resolve it.
jQuery script I wrote should grab the input value on "paste" action and pass it by ajax to codeigniter controller.
It actually works ...
0
votes
1
answer
5k
views
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, ...
3
votes
2
answers
1k
views
Solution for onpaste in Opera <= 11.11
$('#sometextarea')
.change(function(){console.log($(this).val());})
[0].onpaste=function(){
var self=$(this);
var intr=setInterval(function(){
if(self.val().length) ...
1
vote
1
answer
2k
views
Why 'onpaste' event does not work in Iframe with designmode="on"?
In FireFox, I use this and it works properly,
Event.observe(iFramWin,"paste",tableAlignmentFix);
where iFramWin=$("id").contentWindow;
and in IE,
Event.observe(iFramDoc,"paste",tableAlignmentFix);
...
1
vote
3
answers
3k
views
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) {
...
6
votes
4
answers
8k
views
How to determine if an onChange event was called by an onPaste
I have a Javascript function that is associated with an onChange event. I understand that some browsers support onPaste at either the document or an element level. Is there a way to determine if the ...
1
vote
2
answers
3k
views
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 ...