瀏覽代碼

$node->hasAttribute('disabled') sf2 should not create disagreement between implementation and practice for a crawler. If sahi real browser can find an element that is disabled, then sf2 should too.
https://github.com/Behat/Mink/pull/58#issuecomment-1712459

Luis Cordova 14 年之前
父節點
當前提交
8a980bd1e1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/DomCrawler/Form.php

+ 1 - 1
src/Symfony/Component/DomCrawler/Form.php

@@ -281,7 +281,7 @@ class Form extends Link implements \ArrayAccess
         $xpath = new \DOMXPath($document);
 
         foreach ($xpath->query('descendant::input | descendant::textarea | descendant::select', $root) as $node) {
-            if ($node->hasAttribute('disabled') || !$node->hasAttribute('name')) {
+            if (!$node->hasAttribute('name')) {
                 continue;
             }