Fix various crashes and subclass GridView so it doesn't steal focus from the input field