WebDialog.KeyPressed event fires twice on Details.KeyBackspace

I am using Xojo 2017R21. KeyPressed is defined on a text field. If a number (0 - 9) or KeyEnter is pressed, the event fires once as expected. However if KeyBackspace is pressed, the event is fired twice. I end up with my string (mCode) minus 2 numbers. Thoughts?

[code]if (Details.KeyCode >= Asc(“0”) and Details.KeyCode <= Asc(“9”)) then
if Len(mCode) < mCodeLength then
mCode = mCode + Chr(Details.KeyCode)
Call UpdateCode()
End if

elseif Details.KeyCode = Details.KeyBackspace then
if Len(mCode) > 0 then
mCode = Left(mCode, Len(mCode) - 1)
Call UpdateCode()
end if

elseif Details.KeyCode = Details.KeyEnter then
Call CodeTimer()

end if[/code]