AJAX focus fix: test cases
This page bundles several small test cases for the AJAX focus fix setting. Each block tests a different situation in which a page updates without reloading completely. Turn the setting on and off and check each block with your scanner. The simple introduction is on the AJAX focus fix demo page.
A. Standard case: field gets replaced
After the scan the input field is replaced by a new one. The next scan should land in the new field.
B. New field without automatic focus
The new field is not selected automatically. The fix should still hit the first visible input field.
C. Update via "fetch"
The page loads data via the modern "fetch" technique instead of a classic request. The fix should work here too.
D. Several requests at once
After the scan several requests run in quick succession. The focus should settle calmly in the new field and not jump back and forth.
E. Whole screen is rebuilt
Like in SAP, the entire screen content is replaced. The input field sits in the middle of the new content. The next scan should still land there.
F. Specific field among several
After the update there are several fields. The page selects the middle one ("target field"). The scan should land exactly there and not in the first field.
G. Hidden field first
The first field is hidden and locked. The fix should skip it and hit the first visible, usable field.
H. Delayed update (slow server)
The update only arrives after a short delay. As long as it does not take too long, the next scan should still land in the new field.
I. Background request must not interfere
Counter-test: without a prior scan, a request is triggered in the background. The cursor in the field must NOT jump away. Click into the field and then the button.