Fix crash with mouse input in search plugin