wikipathways / pvjs

JavaScript-based pathway viewer and editor
Apache License 2.0
33 stars 19 forks source link

save&close is not triggered when changing datasource or id #344

Closed AlexanderPico closed 9 years ago

AlexanderPico commented 9 years ago

steps to reproduce:

  1. click datanode and open editor (or vice versa)
  2. change datasource and/or id

expected:

observed:

ariutta commented 9 years ago

Now it changes if no activity for 700ms. OK?

AlexanderPico commented 9 years ago

Still not triggered when DEL is clicked, even just once, e.g., when changing "ABC12" to "ABC1". Maybe we need a slightly different event listener...

ariutta commented 9 years ago

It works for me.

Tested on Chrome with this pathway: http://pvjs.wikipathways.org/index.php/Pathway:WP4

  1. Open editor
  2. Select "ADP"
  3. Delete the last character from the identifier so "HMDB01341" becomes "HMDB0134"
  4. Waited <2 sec.

The Close button turned into the green Save&Close button

khanspers commented 9 years ago

Works for me on Chrome, but there is a delay (~2seconds) before the button changes state. Also, an immediate reversal of the change without closing QuickEdit (i.e. changing the data source back to what it was originally, or adding the last number of the identifier that was just deleted), doesn't trigger the button state to go back to Close. In contrast, changes to the display name don't have the same delay in button state change, and reversal works as expected.