can't select elements inside of a form
coolaj86 opened this issue · comments
AJ ONeal commented
HTML:
<form id="ping" action="#test">
Check Port:
<input name='hostname' placeholder="IP Address (i.e. 192.168.1.1)" />:<input name='port' placeholder="Port (i.e. 80)" />
<br/>
<input type="submit" value="Check Port"/>
</form>
JavaScript:
var $ = require('ender')
;
$('form#ping').find('input') // fails
$('form#ping').find('br') // fails
$('body').find('input') // works
$('form input') // works
$('form#ping br') // works
$('form#ping input') // works
$('form#ping input[name=port]') // works
Dustin Diaz commented
whoa
AJ ONeal commented
I might should add that I was testing this in Chrome stable and querySelectorAll
also works as expected:
var el = document.querySelectorAll('form#ping input')[0];
el.querySelectorAll('input');
Dustin Diaz commented
i'm in Chrome 14.0.835.163 Beta and it's working... however my other laptop (which I believe is Chrome xx stable (whatever version stable is)) and it did not work -- so you're not crazy. So it's a bit unclear what to do...
activestylus commented
Any progress?