gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
174 stars 134 forks source link

During auto-save recently added section and lesson titles "jump" during save #2609

Closed brianhogg closed 3 months ago

brianhogg commented 4 months ago

Reproduction Steps

  1. In the course builder, Add a section
  2. Add three lessons, which go under the new section
  3. Add another section
  4. Edit title of first section
  5. Start editing title of first lesson in the session

Expected Behavior

I can continue editing the title of the first lesson, name of first section saves successfully

Actual Behavior

The title of the first new lesson I am editing "jumps" to be the title of the first added section, first lesson title reverts to "New Lesson"

Error Messages / Logs

No error messages. From the request/response, the first section title appears to be sent but it doesn't include the first lesson - just the second and third lesson with orders of 2 and 3.

When clicking away from editing the (now) first section title, it overwrites the first section title text. Editing the first lesson title again then saves and creates a new, real lesson ID.

https://github.com/gocodebox/lifterlms/assets/627497/62c43f5a-6816-4bfb-92ce-4a355f30edfb

This issue has be recreated:

Browser, Device, and Operating System Information

Chrome on macOS

kimcoleman commented 3 months ago

This is not happening in the Course Builder UI/UX update feature branch. We are on longer allowing edit lesson title in the syllabus side, so the issue will not be present and I'm not seeing the jumping anymore.