Skip to Content
0

Defining focus on sub control for custom control

Aug 31, 2017 at 07:13 AM

17

avatar image
Former Member

I am currently developing a custom control which has a div and within it contains a input on the left and a button on the right. What I would like to know is how can I do it such that when the label for the control is click, it will focus on the input and not on the div of the custom control?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Jan 25 at 10:06 PM
0

Hi,

I don't have your code so there are some unknowns here, but if you can attach a press event to this "custom div" then have it point to this function (I'm assuming the Label has an id attribute of "myLabel", i.e. <Label id="myLabel" ... ):

onFocus: function(){
  this.getView().byId("myLabel").focus();	
}
Share
10 |10000 characters needed characters left characters exceeded