Skip to content

Commit

Permalink
Add inputmode attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Lechat committed Jan 7, 2019
1 parent 122f873 commit 0e5ae94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Symfony/Component/Form/Extension/Core/Type/UrlType.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public function buildForm(FormBuilderInterface $builder, array $options)
*/
public function buildView(FormView $view, FormInterface $form, array $options)
{
$view->vars['type'] = $options['default_protocol'] ? 'text' : 'url';
if ($options['default_protocol']) {
$view->vars['attr']['inputmode'] = 'url';
$view->vars['type'] = 'text';
}
}

/**
Expand Down

0 comments on commit 0e5ae94

Please sign in to comment.