preventDefault

Public Function

This function calls event.preventDefault() for you. Why is that useful?

Beacuase if you enable window.preventDefaultLogging = true it'll log out a message when it happens. Because we use console.warn rather than (log) you'll get a stack trace in the inspector telling you exactly where it happened. This is important because e.preventDefault() is the source of many bugs, but unfortuantly it can't be avoided because it also stops a lot of default behaviour which doesn't make sense in our UI

Parameters
NameDescription

event

Event | React.BaseSyntheticEvent

To prevent default on

Returns
void
References

Event, React.BaseSyntheticEvent

Edit this page
Last edited on 11 May 2023
openWindowReadySyncedStore