ender-js / jeesh

The official starter pack for Ender.

Home Page:ender.no.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't select elements inside of a form

coolaj86 opened this issue · comments

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

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');

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...

Any progress?