Fix keyboard handling on ios8