optimize keyboard popup