I am accepting PR #9 knowing that it creates a bug. Ordinarily, if a data entry form value has been edited, navigating away from the edited form will trigger an alert that unsaved data will be lost. The user doing data entry will receive an alert titled "Save your changes" with the options of "Save changes and leave", "Leave without saving changes", and "Stay on page". This dialog is being suppressed by default_when_visible.js because it sets showEraseValuePrompt = 0;.
showEraseValuePrompt is tested for a value of 1 on line 181 of DataEntry.js in the redcap 8.0.0 to determine is if that dialog should be displayed. The conflicting needs of default_when_visible.js and DataEntry.js must be reconciled.