Fix a layout bug when <input type="number"> is not supported.