Hi Piotr, good to know it. So definitely something to look at a later time. We have a "setFocus()" method in Jewel TextInput since other controls (button, checkbox) need this too, I want to remove from TextInput an made something more generic, but testing this bead was making different things from time to time...it's the magic of browsers ;)
El mar., 24 mar. 2020 a las 22:16, Piotr Zarzycki (< piotrzarzyck...@gmail.com>) escribió: > Hi Carlos, > > I have spent on that focus stuff a lot of time and I gave up. I was able > to get proper focus on very first control text input after app > initComplete. When I enter to any other view and explicitly make set focus > on text input - it doesn't work. It look like focus was always taken by > different control. > > Thanks, > Piotr > > > On Tue, Mar 24, 2020, 9:41 PM Carlos Rovira <carlosrov...@apache.org> > wrote: > >> Hi Alex, >> >> thanks I'll try that as I have time (or if you want to take over feel >> free), since people reported me that still is not working. The actual >> approach seems to have an unexpected behaviour >> >> Thanks >> >> >> >> >> El mar., 24 mar. 2020 a las 19:49, Alex Harui (<aha...@adobe.com>) >> escribió: >> >>> FWIW, it might be worth considering a different approach. Two issues >>> with putting a bead on a component like this is: >>> >>> >>> >>> 1. Timing: beads are applied very early >>> 2. Duplication: There isn’t anything that will detect that you >>> accidentally have this bead on another component somewhere. >>> >>> >>> >>> An alternate approach is to have the SetFocus bead on the >>> container/application strand. Then it can hook “initComplete” event and it >>> will hopefully be more obvious if you use more than one. >>> >>> >>> >>> HTH, >>> >>> -Alex >>> >>> >>> >>> *From: *Carlos Rovira <carlosrov...@apache.org> >>> *Reply-To: *"users@royale.apache.org" <users@royale.apache.org> >>> *Date: *Monday, March 23, 2020 at 4:03 PM >>> *To: *"users@royale.apache.org" <users@royale.apache.org> >>> *Subject: *SetFocus bead >>> >>> >>> >>> Hi, >>> >>> >>> >>> just added SetFocus() bead to help Fred here [1] >>> >>> Although it's a very simple bead, I was having issues making it work, so >>> I added a comment of "warning still not working", but the fact is it seems >>> to work. Don't know why the tests was not working :? >>> >>> >>> >>> Additionally: You have as well <js:DispatchInputFinishedBead/> >>> >>> >>> >>> and >>> >>> can be used with: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> control.addEventListener(DispatchInputFinishedBead.INPUT_FINISHED, >>> doSomething); >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> so when control lose focus do something >>> >>> >>> >>> HTH >>> >>> >>> >>> Carlos >>> >>> >>> >>> [1] >>> https://stackoverflow.com/questions/60814130/how-to-setfocus-on-apache-royale-jewel-button/60822643#60822643 >>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F60814130%2Fhow-to-setfocus-on-apache-royale-jewel-button%2F60822643%2360822643&data=02%7C01%7Caharui%40adobe.com%7C590c17e3eb0b4548196208d7cf7e5d90%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637206013952691007&sdata=grR%2Bn9kt8kM9a9RNLVS2DG5GngFh3ou%2BI1mFM1JwITo%3D&reserved=0> >>> >>> >>> >>> -- >>> >>> Carlos Rovira >>> >>> http://about.me/carlosrovira >>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C590c17e3eb0b4548196208d7cf7e5d90%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637206013952695980&sdata=lbjbFbKMoOxKhEqeJDplrWi4tlSmgmWEDPANSz6Qk0s%3D&reserved=0> >>> >>> >>> >> >> >> -- >> Carlos Rovira >> http://about.me/carlosrovira >> >> -- Carlos Rovira http://about.me/carlosrovira