Check out a free preview of the full Debugging and Fixing Common JavaScript Errors course
The "Challenge 2: Persisting Text" Lesson is part of the full, Debugging and Fixing Common JavaScript Errors course featured in this preview video. Here's what you'd learn in this lesson:
In this challenge, students identify and resolve a bug of persisting text.
Transcript from the "Challenge 2: Persisting Text" Lesson
[00:00:00]
>> So let's do another bug. So here I have a feature that's blowing up, here Rant text is remembered after we delete it. And so a user reported this to us, which is, the most expensive kind of issue. So let's see if we can figure this out. So the feature that I have here Which I think is really cool, is that if your user is typing some very thoughtful rant, and they're just spending a lot of time wordsmithing something, like front end masters is so lame, fake news.
[00:00:45]
And then, I don't know how to finish that. Later I can come back, and reload the page, and it's still there, right? I wanna pick up where I left off. So, when I'm ready to pick up and keep going and say, it's fake news, so sad, that's it.
[00:01:05]
But maybe now I reconsider and I say, you know what, that's wrong and inflammatory, and I should really delete that. So, I'm going to select all the text and remove it. But the next time I come back to get ranter, it shows up again. So why is it still there?
[00:01:27]
So we're gonna turn this over to you right away, to some of the same techniques you already used. I'd say, take a look at the DOM inspector and see what are the things that are listening to that textbox. And see if you can figure out, why is this remembering the text even though the user deleted everything in it
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops