private void OnGainedFocus(FocusInEvent evt) { hasFocus = true; UpdateOptionList(); UpdateVisibility(); UpdatePosition(); }
void OnFocusInEvent(FocusInEvent evt) { m_TextElement.edition.SaveValueAndText(); // When this input field receives focus, make sure the correct text editor is initialized // (i.e. hardware keyboard or touchscreen keyboard). if (touchScreenTextFieldChanged) { InitTextEditorEventHandler(); } // When focused and the keyboard availability changes, make sure the correct text editor is // initialized under these new conditions and un-focus this input field. if (m_HardwareKeyboardPoller == null) { m_HardwareKeyboardPoller = m_TextElement.schedule.Execute(() => { if (touchScreenTextFieldChanged) { InitTextEditorEventHandler(); m_TextElement.Blur(); } }).Every(250); } else { m_HardwareKeyboardPoller.Resume(); } }
void OnFocusIn(FocusInEvent e) { var gv = GetFirstAncestorOfType <VFXView>(); if (!IsSelected(gv)) { Select(gv, false); } e.StopPropagation(); }
protected override void ExecuteDefaultActionAtTarget(EventBase evt) { base.ExecuteDefaultActionAtTarget(evt); if (elementPanel != null && elementPanel.contextualMenuManager != null) { elementPanel.contextualMenuManager.DisplayMenuIfEventMatches(evt, this); } if (evt?.eventTypeId == ContextualMenuPopulateEvent.TypeId()) { ContextualMenuPopulateEvent e = evt as ContextualMenuPopulateEvent; int count = e.menu.MenuItems().Count; BuildContextualMenu(e); if (count > 0 && e.menu.MenuItems().Count > count) { e.menu.InsertSeparator(null, count); } } else if (evt.eventTypeId == FocusInEvent.TypeId()) { SaveValueAndText(); } else if (evt.eventTypeId == KeyDownEvent.TypeId()) { KeyDownEvent keyDownEvt = evt as KeyDownEvent; if (keyDownEvt?.keyCode == KeyCode.Escape) { RestoreValueAndText(); parent.Focus(); } } editorEventHandler.ExecuteDefaultActionAtTarget(evt); }
private void OnAttributeValueFocus(FocusInEvent focusInEvent) { _valuesEditElement.SuggestOptions = _browser !.Query.AttributeValues(_nameEditElement.Value); }
void OnFocusIn(FocusInEvent evt) { DropDown(); }