• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Pasting with the mouse into the admin search doesn't fire the search action

rellect

Well-known member
#1
Just a little thing that caught me few times.
When a string is pasted into the input by the mouse (right click -> Paste), it doesn't fire the search action.
 

SamL

Active member
#2
Pasting is not supposed to explicitly execute the function. It's just a text entry field like any other.
For instance, what if you wanted to paste that text into the field and edit it before searching for the edited term....
 

rellect

Well-known member
#3
Pasting is not supposed to explicitly execute the function. It's just a text entry field like any other.
For instance, what if you wanted to paste that text into the field and edit it before searching for the edited term....
It does work with ctrl+v, so...
 

Karelke

Active member
#4
It does work with ctrl+v
I presume the script does not recognize a paste command, CTRL + V simply triggers a keydown/keyup event.

I believe the browser does not fire an event after pasting text with the mouse, therefore it's nearly impossible to trigger the search action.
 

rellect

Well-known member
#5
I presume the script does not recognize a paste command, CTRL + V simply triggers a keydown/keyup event.

I believe the browser does not fire an event after pasting text with the mouse, therefore it's nearly impossible to trigger the search action.
There's a 'paste' event. I verified that now again just to be sure.
 

Karelke

Active member
#6
Last edited:

Mike

XenForo developer
Staff member
#7
I've fixed this in a couple places, though there are likely a few places which haven't been changed (though they've very unlikely to come up).

We don't need to know what is pasted, just that the paste is happening. Some browsers do give you access to the clipboard data once the paste is happening as well.