There is no special event for that specific button. But you could combine some event-listeners to estimate if the focus-change was triggered by that button.
let isKeyboardActive = false;
document.addEventListener('focusout', function(event) {
isKeyboardActive = true; // virtual iOS keyboard is visible
});
document.addEventListener('focusin', function(event) {
isKeyboardActive = false; // virtual iOS keyboard is hidden
});
let touchesActive = 0;
let inputs = document.querySelectorAll('input');
for (let input of inputs) {
input.addEventListener('touchstart', function(event){
touchesActive++;
});
input.addEventListener('touchend', function(event){
setTimeout(function(){ touchesActive--; }, 500); // we need a delay here
});
input.addEventListener('touchcancel', function(event){
setTimeout(function(){ touchesActive--; }, 500); // we need a delay here
});
input.addEventListener('focus', function(event){
if (isKeyboardActive && touchesActive < 1) { // check number of active touches and virtual keyboard-state
// focus probably changed by the virtual iOS keyboard
}
});
}
Tested with Safari on iOS 12.3.1 (iPhone)