I’m having trouble with Google Sheets scripting and need some help. I’m working with the onEdit trigger but noticed it has a weird behavior. When someone clicks on a cell to edit it and then enters the exact same value that was already there, the onEdit event doesn’t fire at all. This is causing issues in my script because I need to track when cells are being actively edited, even if the final value doesn’t change. Is there a way to capture these editing sessions where users open a cell for editing but don’t actually modify the content? Maybe there’s a different event or workaround I should be using instead?
i faced this too, it’s a pain! onEdit won’t help for same values, but ya maybe try onSelectionChange with a setTimeout to check if any edits were made after a few ms. it’s not perfect but can help track edits better!
Yeah, this is a frustrating Google Sheets limitation that drives developers crazy. The onEdit trigger only fires when data actually changes - not when someone just clicks into a cell to edit. I’ve dealt with this before. Here’s what works: combine the onSelectionChange trigger with timestamp logging. When someone selects a cell, log the timestamp and cell reference. Then use a delayed function to check if they actually edited anything within a few seconds. Another trick I’ve used - create a custom menu or sidebar that users click before editing. It’s clunky, but it captures their editing intent whether they change values or not. Not elegant solutions, but they work when you need to track editing activity instead of just value changes.
Google Sheets doesn’t have a native trigger for detecting when someone edits a cell but doesn’t actually change the value. The onEdit trigger only fires when content actually changes, which makes sense for performance reasons. I ran into this same problem on a project where I needed to log all user interactions. My workaround was using Google Apps Script’s HTML service to create a custom interface that captures click events on cells. Then, I had it communicate with the script through google.script.run. This way, I could track when users clicked into cells whether they changed anything or not. I also tried using the onSelectionChange trigger with timestamp tracking; it captures selection attempts but is not perfect. It might work for what you need, though.