Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected.
No return value.
The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.
Bubbles Yes Cancels Yes To invoke
- Press the ENTER key or click an object when it has focus.
- Double-click an object.
Default action Moves the object into a UI-activated state.
For the HTMLTableEvents::onbeforeeditfocus event to fire, document elements must be in edit mode. One way to invoke edit mode is to set the IHTMLDocument2::designMode property to
The HTMLTableEvents::onbeforeeditfocus event differs from the onfocus event. The HTMLTableEvents::onbeforeeditfocus event fires before an object enters a UI-activated state, whereas the onfocus event fires when an object has focus.
As of Microsoft Internet Explorer 5.5, Web authors can also set the contentEditable attribute to
trueon the body element, and if necessary, to specific elements in the body, to invoke edit mode.