Fix dirty calculation on cancellation of an inline editor.
Review Request #6442 — Created Oct. 14, 2014 and submitted — Latest diff uploaded
cancel()
was updating the dirty state in order to determine if it should
show a prompt. However, unlikesave()
, we don't want to unconditionally
do this, as we can end up in a state where the initial and current
fields don't match, but the user hasn't actually changed anything
(depending on the initial value set in an edited field).We now call
dirty()
instead, which will properly handle forcing a
computation only if necessary.
Unit tests pass.
No longer saw a prompt on cancel for Markdown fields.