TextBlock backspace error

I’m using the textValidation property with GoJS’s TextBlock to perform data validation. However, when there is an error due to duplicate or null values, and I click the back button in this state, I encounter the error “Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of this node.” Is there a way to ignore this error?

The TextBlock.textValidation function, if provided, must not have any side-effects on the Diagram or the Model.
TextBlock | GoJS API

What does your textValidation function do?

Maybe you want to set TextBlock.errorFunction instead?

The textBlock returns false if the newly entered value through it matches the existing data or if it is null. When false is returned, the textBlock remains active regardless of where I click. If the textBlock is active and I press the back button, the error mentioned above occurs. I also attempted to use the errorFunction , but it had no significant effect.

Do you mean when editing the text incorrectly the user goes back in the browser history to the previous page? That has nothing to do with GoJS.

You still haven’t shown what the stack trace is when getting the error.