How to control focus of a Custom Widget in order to not block device events, e.g. when reading a barcode with a barcode scanner

Hello, is there a way to explicitly tell Tulip to loose focus from a Custom Widget?

Context: I have a custom widget which displays a custom table where the operator can make a selection.

On the step that displays the Custom Widget I have a device trigger which listens for barcode scanner input.

Problem: When the Custom Widget has focus, the barcode scanner trigger is no longer firing. It will only fire if the operator first clicks somewhere outside of the custom widget, i.e. make it loose focus.

Hence my question if there is a way to explicitly make the custom widget loose focus from within the custom widget. I.e. after a getValue function execution inside the widget itself?

Trying to access the parent window - as expected - will cause a cross-origin error… so that does not seem to be an option at present.

1 Like