Making popup show only when word under caret matches input