[fix] error when adding tags with keyboard. Fixes #4394