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

refael

Well-known member
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.
 
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....
 
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...
 
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.
 
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.
 
Last edited:
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.
 
Top Bottom