Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes field does not clear when you navigate with < > in flight editor mode #1452

Closed
reevery opened this issue Nov 7, 2023 · 2 comments
Closed
Labels

Comments

@reevery
Copy link

reevery commented Nov 7, 2023

Hi. I was editing some flights today using the GUI. I noticed that when you start with a flight with notes, then navigate to the previous or next using the navigation buttons < or >, the notes field does not clear. That means, if you save the next flight, you save the notes from the previous flight to every other until you notice.

@reedy reedy added the bug label Nov 18, 2023
@reedy
Copy link
Collaborator

reedy commented Nov 18, 2023

It's not just </>; if you click edit on one, exit, and then edit on another that doesn't have a note set... that note will also load...

@reedy
Copy link
Collaborator

reedy commented Nov 18, 2023

I suspect the issue is related to this:

  if(col[16] != "") {
    $('note').style.color = '#000';
    form.note.value = col[16];
  } else {
    $('note').value = $('note').hintText;
  }

The else case was removed when doing some refactoring of the hinted text boxes. In the old version, if the column from the DB was not "", we set the text, falling back to the hint text. This isn't needed now, so we don't clear the state properly... Easily fixed at least.

@reedy reedy closed this as completed in b4a9ae3 Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants