royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Chrome complains about text input with same id
Date Fri, 26 Oct 2018 19:32:49 GMT
Hi,

I create a component in MXML that has a TextInput. Since this component is
reusable I have it two instances in my App
In chrome I see

[DOM] Found 2 elements with non-unique id #code_ti: (More info:
https://goo.gl/9p2vKq) <input type="text" id="code_ti" maxlength="5">

I think there's no problem with the two components, but since chrome
doesn't like things like this (in fact html spec wants no duplicate ids)

I was trying to see how can I do. Inside my MXML I have an Script block
that references the text input id. In fact the ID is to do that ;)
So I can remove it, but at the same time, I'm generating html that is not
right.

So how can we deal with this? maybe our id, doesn't should be creating
attribute id in the tag? and make the id reference in other form?

Thanks

-- 
Carlos Rovira
http://about.me/carlosrovira

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message