fix the problem when getting the focus value