flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: [FlexJS] returning surrounding element in TextInput
Date Tue, 25 Oct 2016 06:04:01 GMT
Hi Alex,

this seems not work. I have this:

            element = input as WrappedHTMLElement;

            positioner = div as WrappedHTMLElement;
            positioner.style.position = 'relative';
            (div as WrappedHTMLElement).flexjs_wrapper = this;
            (input as WrappedHTMLElement).flexjs_wrapper = this;
            (label as WrappedHTMLElement).flexjs_wrapper = this;
            element.flexjs_wrapper = this;

In this way input change handler works, but MDL look is messed, this is the
code generated, that is missing the first div class selectors:

<div style="position: relative;">
     <input type="text" class="mdl-textfield mdl-js-textfield mdl-textfield
mdl-js-textfield" data-upgraded=",MaterialTextfield">
     <label class="mdl-textfield__label"></label>

2016-10-24 23:59 GMT+02:00 Alex Harui <aharui@adobe.com>:

> Try setting element as input and positioner as div.
> Sent from my LG G3, an AT&T 4G LTE smartphone
> ------ Original message------
> *From: *Carlos Rovira
> *Date: *Mon, Oct 24, 2016 2:20 PM
> *To: *dev@flex.apache.org;
> *Subject:*[FlexJS] returning surrounding element in TextInput
> Hi,
> I'm subclassing TextInput (html)
> I need to create a div that surrounds the input.
> In html there is only input and that's the element returned.
> so my question is...how should I do to return the <div> with the <input>
> inside and makes the element points to the input (since the events and
> handlers depends of element (the input) to do work properly
> Until now I was returning the element as the surrounding div, but this end
> in malfunction of change event.
> Thanks.
> --
> Carlos Rovira
> http://about.me/carlosrovira

Carlos Rovira

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