Introduce artificial delays in your API modules (sleep(2); at the top of ApiOpenSearch::execute() and ApiQueryInfo::execute(); alternatively, you can try this in production if you're quick enough), then perform the following steps quickly:
- Inspect an existing link
- Change its target
- Before the API request completes, close the link inspector by clicking out or clicking the back arrow
- Inspect the link again
Expected: new target shows in inspector
Actual: old target shows
With the keyboard it's even weirder:
- Inspect an existing link
- Type "foo". Wait for the API request to come back and display suggestions
- Type "bar" at the end (so you now have "foobar"), then quickly (before the API call comes back) press Enter.
- Expected: inspector closes. Actual: input value is reset to "foo"
(At least if you press Enter again, "foo" is actually saved.)
You can work around this and still reproduce the first bug:
- Inspect an existing link
- Type "foo"
- If a suggestion box is displayed (perhaps because "f" was in cache, or because the previous value was in cache), press Esc to dismiss it
- Press Enter, the inspector closes
- Inspect the link again
Expected: "foo"
Actual: previous value
Version: unspecified
Severity: normal