The fancy javascript +/- (plus / minus) widget doesn't work so great on a mobile device.
Since the field is still a text field, the user input is a keyboard instead of a number chooser.
Using a HTML5 number input for supported devices would greatly improve the user experience here.

Additionally, the plus / minus buttons are not aligned properly on mobile.

this is not what i want

CommentFileSizeAuthor
Screenshot 7:30:14 12:26 PM-3.png38.03 KBAaronBauman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

igonzalez’s picture

I've solved installing Html5 tools and Elements modules. I then added a custom module with this code:

function hook_form_alter(&$form, &$form_state, $form_id) {
	if ($form_id == "views_form_custom_view_page") {	
		if(isset($form['add_to_cart_quantity'])) {
			for($i = 0; $i < count($form['add_to_cart_quantity']); ++$i) {
      				if (isset($form['add_to_cart_quantity'][$i]['#type'])) {
					 if ($form['add_to_cart_quantity'][$i]['#type'] == "textfield") {
						 $form['add_to_cart_quantity'][$i]['#type'] = 'numberfield';
 					}
				 }
 			}
		}
	}
	if ($form_id == "views_form_commerce_cart_form_default") {	
		if (isset($form['edit_quantity'])) {
			for($i = 0; $i < count($form['edit_quantity']); ++$i) {
				if (isset($form['edit_quantity'][$i]['#type'])) {
					if ($form['edit_quantity'][$i]['#type'] == "textfield") {
						$form['edit_quantity'][$i]['#type'] = 'numberfield';
					}
				}
			}
		} 
	}
}

I hope someone will be useful