idk - Notes app content update + element exceeding window bug??
I updated the HTML so that I can add content through JavaScript so it does not need to be hard coded into the HTML file. I spent of bit of time debugging this as I couldn’t figure out why some of the content I added to the Notes app was disappearing when I clicked it. Turns out there were a few issues like calling the same function twice, but I also realised I added an event listener that ran the wrong function which was why some of the content was disappearing.
Also, I did the ‘additional challenges’ in the guide, mainly the 4th point about the bug where windows can exceed the screen width and height. I used a bit of Gemini here to figure out how to get max and min values from a set of numbers (Maths.min and Maths.max) and also used W3Schools to get the window height and width as well as the div element’s own height and width. Using this, I implemented my own logic (with an if statement) to contain the element within the viewport height and width. This took a tiny bit of trial and error coz I kept getting confused on when to use min and when to use max but I got there eventually 