KDE apps feature this x icon at the end of every text input which does exactly that - a middle click on it will empty the field and replace its contents with what was in the buffer while a click somewhere in the field will insert. Firefox (and every other app/platform lacking this) is to blame for not having this totally simple and obvious feature... reminds me of how session management was badly implemented and then blamed for not working, thus removed. Ignorance is bliss...