flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] returning surrounding element in TextInput
Date Tue, 25 Oct 2016 06:42:52 GMT
Hi Carlos,

I'm not sure we have other components with a different positioner than element, so you may
be in new territory.  I do want it to work, so it is hopefully just a matter of fixing bugs.

How is are the div's missing class selectors specified?  I think UIBase className is only
set on the element.  You may need to override that.

HTH,  I'm done for tonight.

From: <carlos.rovira@gmail.com<mailto:carlos.rovira@gmail.com>> on behalf of Carlos
Rovira <carlosrovira@apache.org<mailto:carlosrovira@apache.org>>
Date: Monday, October 24, 2016 at 11:04 PM
To: Alex Harui <aharui@adobe.com<mailto:aharui@adobe.com>>
Cc: "dev@flex.apache.org<mailto:dev@flex.apache.org>" <dev@flex.apache.org<mailto:dev@flex.apache.org>>
Subject: Re: [FlexJS] returning surrounding element in TextInput

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"
     <label class="mdl-textfield__label"></label>

2016-10-24 23:59 GMT+02:00 Alex Harui <aharui@adobe.com<mailto: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<mailto:dev@flex.apache.org>;
Subject:[FlexJS] returning surrounding element in TextInput


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.


Carlos Rovira

Carlos Rovira

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