Input Text element loses focus when Observable is active

7 views
Skip to first unread message

rob...@leapyear.io

unread,
Sep 19, 2017, 7:38:27 PM9/19/17
to Angular and AngularJS discussion
In an Angular 4 app me & my team are building, we've noticed that an Input element loses focus when an Observable is running (looking for a change to a Django model field).  When the Observable is not running, the focus is not lost.

Clearly this is unacceptable for the user experience.

How can we fix this?

Robert

Sander Elias

unread,
Sep 22, 2017, 10:44:36 AM9/22/17
to Angular and AngularJS discussion
Hii Robert.

Observables do not change the focus unless somewhere in the flow your code is causing that. If you can put a sample of this in plkr/code-pen/edit.ng/... then I will take a look at it, and help you out. (it might be that the observables change some things in the UI, that might influence this, but that should be very rare!)

Regards
Sander
Reply all
Reply to author
Forward
0 new messages