HI Alex and Peter for taking the time to see this

2017-02-02 7:15 GMT+01:00 Alex Harui <[email protected]>:

> I think I correctly built a no-Flex HTML&JS test of RadioButtons:
>
> http://home.apache.org/~aharui/Test/MDLRadioButtons.html
>
> You can View Source on it to see if I did it right.
>
>
The source seems right to me


> I found out that if I listen to the outer Label, then I get two click
> events.  But if I listen to the inner Input, which this example does, then
> I only get one click event.  So one possible workaround is to override
> addEventListener and listen to the Input for "click".
>
>
I tried that but in our case doesn't work, but don't know why

In our case the input radio is "icon.element" and we should change
to "icon.element.addEventListener("click", clickHandler, false);" right?

and handler could be:

COMPILE::JS
        public function clickHandler(event:Event):void
        {
            event.preventDefault();
            selected = !selected;

        }

right?

But this doesn't work and the click is still throwing and incrementing the
counter two times

But, If I remove clickhandler completely, still the same counter goes 0, 2,
4...

Alex, could you try it yourself? maybe I'm missing something

So this is really weird! :?



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

Reply via email to