merge sbberic's latest fix for persistent styling after enter