Should calling client.focus()
imply preventDefault()
#6
Labels
future-api
Issue discusses possible extensions to the current API.
client.focus()
imply preventDefault()
#6
My intuition here is that it should, as otherwise we open the path for strange behavior (I called client.focus() but the browser still opened a new window!).
This raises the question of whether
preventDefault
even needs to be part of the spec, as the event already MUST focus a client or show a notification in order to prevent default behavior. This means that a call to preventDefault is either:a) Superfluous, we already know the app intends to preventDefault, they called client.focus() or displayed a notification or
b) A no-op, the app called
preventDefault
but they didn't focus a client/show a notification, so the browser does whatever it normally does.For example, compare (explicit preventDefault):
and (with preventDefault implicit)
@raymeskhoury
The text was updated successfully, but these errors were encountered: