diff --git a/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php b/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php index 39b9d2d20828c..17460688b7fd6 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php @@ -14,8 +14,6 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; class UrlType extends AbstractType @@ -30,17 +28,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['default_protocol']) { - $view->vars['attr']['inputmode'] = 'url'; - $view->vars['type'] = 'text'; - } - } - /** * {@inheritdoc} */ diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index 4440776a8f3b8..4036f686cfdfc 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -2260,10 +2260,9 @@ public function testUrlWithDefaultProtocol() $this->assertWidgetMatchesXpath($form->createView(), [], '/input - [@type="text"] + [@type="url"] [@name="name"] [@value="http://www.google.com?foo1=bar1&foo2=bar2"] - [@inputmode="url"] ' ); }