# Firefly target input field/validation is broken

XMLWordPrintable

## Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
1
• Sprint:
SUIT Sprint 2018-10
• Team:
Science User Interface

## Description

In dev, when i start typing a target name in target panel, the validation fails and overwrite my key strokes.

Start typing 'ngc 7009' it doens't work, the cursor goes back and forth...

I think it could be this change but i'm not sure:

https://github.com/Caltech-IPAC/firefly/commit/8074feeecc8584c0b9cbc6306c8e8ec56246a774

Console error includes:

 TypeError: Cannot read property 'name' of undefined  at eval (TargetPanelWorker.js?92e5:189) 

## Activity

Hide
Xiuqin Wu [X] (Inactive) added a comment - - edited

With Emmanuel Joliet's help, I can reproduce this bug. The trick is to type in the name fast. I think it was caused by calling the NED name resolver too frequently both during inputting and deleting the object name, and reset the cursor at the wrong input position when the error message returned.

This was introduced after September 11, 2018 build deployed at lsst-demo.

Show
Xiuqin Wu [X] (Inactive) added a comment - - edited With Emmanuel Joliet 's help, I can reproduce this bug. The trick is to type in the name fast. I think it was caused by calling the NED name resolver too frequently both during inputting and deleting the object name, and reset the cursor at the wrong input position when the error message returned.    This was introduced after September 11, 2018 build deployed at lsst-demo.
Hide
Tatiana Goldina added a comment -

I introduced this bug in target resolution error handling ticket (https://github.com/Caltech-IPAC/firefly/pull/652). I missed that the promise can be rejected because target input has changed and a newer promise is created. Catch is invoked, but it's not an error condition.

The fix in TargetPanelWorker was trivial, no pr created.

firefly dev commit 18493e913 on October 8

Show
Tatiana Goldina added a comment - I introduced this bug in target resolution error handling ticket ( https://github.com/Caltech-IPAC/firefly/pull/652 ). I missed that the promise can be rejected because target input has changed and a newer promise is created. Catch is invoked, but it's not an error condition. The fix in TargetPanelWorker was trivial, no pr created. firefly dev commit 18493e913 on October 8

## People

• Assignee:
Tatiana Goldina
Reporter:
Emmanuel Joliet
Watchers:
Emmanuel Joliet, Tatiana Goldina, Xiuqin Wu [X] (Inactive)