Open cathysarisky opened 4 days ago
This looks like a tricky react state bug of some sort. Having trouble putting my finger on it, but basically, setNewItem doesn't get called for changes in the URL field , only on blur. The enter key does not trigger the necessary saving of the url before a new row gets added. I think.
Issue Summary
Attempting to create a new navigation entry by pressing enter instead of clicking the green plus results in the new url being on the line below the new label. Setup: Then press enter (with the focus on the url field):
Pressing enter a second time triggers an error (makes sense) but also a render loop.
I'm leaving the render loop here with the first bug, in hopes that fixing the enter error will result in resolution of the render loop.
Steps to Reproduce
Enter a label and url on the last line in the navigation editor.
Press return instead of the green plus.
(The render loop is a lot more obvious with console logging added to line 11 of NavigationEditForm.tsx)
Ghost Version
5.98 (Ghost pro)
Node.js Version
Ghost pro
How did you install Ghost?
Ghost Pro (also seen on dev setup)
Database type
MySQL 8
Browser & OS version
Chrome, Windows 10
Relevant log / error output
Code of Conduct