Remove Focus from Label

After we upgraded app to 8.1.9 Label has started to get Focus. How can I remove it or skip it ?
We are embedding view where is input and label. In the caller view there is also button. When the label is hidden focus goes from input to button, but then we show Label and that means Focus from Input goes to label and then to button. How can I disable it / remove it / skip it ? I already tride hiding it but it does nothing in onblur event on input. I tried wrapping it. Nothing helped

Not sure how its getting focus,
but i know about tabIndex…
Which is an html property which i dont think ignition lets us change (yet) :frowning:

A workaround i can think of is using a disabled input component as label and create a style so that it looks like a normal lable instead of an disabled input.
Because tab’s should skip disabled inputs.

I too think that a label is not able to be given focus. What makes you suspect that it is? I’d say something else or the browser itself is getting focus.

I didn’t set up your embedded view but this may help:

  • In your button events, add an onClick script, and send a message to the text field.
	system.perspective.sendMessage("textFieldFocus", {}, scope = 'page')
  • On the text field, right-click | Configure scripts … | Add handler, name it “textFieldFocus” and set the Listen Scopes to Page. Add the following code:

Hi sorry, I figured it out the Label is not the problem.
I used this How to track focused element in browser and it shows label is not focused at all

Does it happen to be a popup? I know there was a bug that caused things to lose focus in a popup that does not fit the screen

no no it was regular site

1 Like