Propagates the a focus event.<p>
490031
protected void propagateFocusEvent() {

        if (m_initialized) {
            NativeEvent nativeEvent = Document.get().createFocusEvent();
            DomEvent.fireNativeEvent(nativeEvent, this, getElement());
        }
    }
210632
function clickSendMessage() {
    var currentText = $('#message_text').val().trim();

    if (!currentText.length) {
        return;
    }

    $('#message_text').val('').focus();

    sendMessage(currentText, null);
}
652471
function( e )
        {
            var event      = new Event( aType );
            event.target   = self;
            event.srcEvent = e;

            aHandler( event );
        }
402368
def hook_focus_events(self):
        
        widget = self.widget
        widget.focusInEvent = self.focusInEvent
        widget.focusOutEvent = self.focusOutEvent
130704
@UiHandler("m_fadePanel")
    void onFadeClick(ClickEvent event) {

        m_textbox.setFocus(true);
        m_textbox.setCursorPos(m_textbox.getText().length());
    }
1355822
function(event) {
      if(this.layer) {
         if(this.layer.focusedContainer && this.layer.focusedContainer != this) {
            this.layer.focusedContainer.removeFocus();
         }
         this.setFocus();
         this.layer.focusedContainer = this;
      }
   }
1061363
function(event) {
    var inputs = $(event.target).parents("form").eq(0).find(":input:visible");
    var inputIndex = inputs.index(event.target);
    // If at end of focusable elements return false, if not move forward one.
    if (inputIndex == inputs.length - 1) {
      // return false on last form input so we know to let the form submit.
      return false
    } else {inputs[inputIndex + 1].focus();}
  }
224327
def focusOutEvent(self, event):
        
        super(XLineEdit, self).focusOutEvent(event)
        
        self._focusedIn = False
224499
function setFocusedElement(cstOption) {
    if (focusedElement) {
      focusedElement.classList.remove(builderParams.hasFocusClass);
    }
    if (typeof cstOption !== 'undefined') {
      focusedElement = cstOption;
      focusedElement.classList.add(builderParams.hasFocusClass);
      // Offset update: checks if the focused element is in the visible part of the panelClass
      // if not dispatches a custom event
      if (isOpen) {
        if (cstOption.offsetTop < cstOption.offsetParent.scrollTop
          || cstOption.offsetTop >
            (cstOption.offsetParent.scrollTop + cstOption.offsetParent.clientHeight)
            - cstOption.clientHeight) {
          cstOption.dispatchEvent(new CustomEvent('custom-select:focus-outside-panel', { bubbles: true }));
        }
      }
    } else {
      focusedElement = undefined;
    }
  }
548685
def focusOutEvent(self, event):
        """"""
        # Calling asynchronously the 'add_current_text' to avoid crash
        # https://groups.google.com/group/spyderlib/browse_thread/thread/2257abf530e210bd
        if not self.is_valid():
            lineedit = self.lineEdit()
            QTimer.singleShot(50, lambda: lineedit.setText(self.selected_text))

        hide_status = getattr(self.lineEdit(), 'hide_status_icon', None)
        if hide_status:
            hide_status()
        QComboBox.focusOutEvent(self, event)
359484
public void focus() {
        String cantFocus = "Unable to focus on ";
        String action = "Focusing on " + prettyOutput();
        String expected = prettyOutputStart() + " is present, displayed, and enabled to be focused";
        try {
            if (isNotPresentDisplayedEnabledInput(action, expected, cantFocus)) {
                return;
            }
            WebElement webElement = getWebElement();
            new Actions(driver).moveToElement(webElement).perform();
        } catch (Exception e) {
            log.warn(e);
            reporter.fail(action, expected, cantFocus + prettyOutputEnd() + e.getMessage());
            return;
        }
        reporter.pass(action, expected, "Focused on " + prettyOutputEnd().trim());
    }
20628
@Override
    protected void onFocusChanged(boolean focused, int direction,
                                  Rect previouslyFocusedRect) {
        super.onFocusChanged(focused, direction, previouslyFocusedRect);
        showErrorIconHax(lastErrorIcon);
    }
1359585
public <E extends Event> void publish(E event) {
        if (!eventListenerMap.isEmpty()) {
            EventListener<E> eventListener = getEventListener(event);
            if (eventListener != null) {
                eventListener.on(event);
            }
        }
    }
493114
function (ev) {
        var target = Event.getTarget(ev),
            node = this.getNodeByElement(target),
            newNode = node,
            KEY = YAHOO.util.KeyListener.KEY;

        switch(ev.keyCode) {
            case KEY.UP:
                this.logger.log('UP');
                do {
                    if (newNode.previousSibling) {
                        newNode = newNode.previousSibling;
                    } else {
                        newNode = newNode.parent;
                    }
                } while (newNode && !newNode._canHaveFocus());
                if (newNode) { newNode.focus(); }
                Event.preventDefault(ev);
                break;
            case KEY.DOWN:
                this.logger.log('DOWN');
                do {
                    if (newNode.nextSibling) {
                        newNode = newNode.nextSibling;
                    } else {
                        newNode.expand();
                        newNode = (newNode.children.length || null) && newNode.children[0];
                    }
                } while (newNode && !newNode._canHaveFocus);
                if (newNode) { newNode.focus();}
                Event.preventDefault(ev);
                break;
            case KEY.LEFT:
                this.logger.log('LEFT');
                do {
                    if (newNode.parent) {
                        newNode = newNode.parent;
                    } else {
                        newNode = newNode.previousSibling;
                    }
                } while (newNode && !newNode._canHaveFocus());
                if (newNode) { newNode.focus();}
                Event.preventDefault(ev);
                break;
			case KEY.RIGHT:
				this.logger.log('RIGHT');
				var self = this,
					moveFocusRight,
					focusOnExpand = function (newNode) {
						self.unsubscribe('expandComplete',focusOnExpand);
						moveFocusRight(newNode);
					};
				moveFocusRight = function (newNode) {
					do {
						if (newNode.isDynamic() && !newNode.childrenRendered) {
							self.subscribe('expandComplete',focusOnExpand);
							newNode.expand();
							newNode = null;
							break;
						} else {
							newNode.expand();
							if (newNode.children.length) {
								newNode = newNode.children[0];
							} else {
								newNode = newNode.nextSibling;
							}
						}
					} while (newNode && !newNode._canHaveFocus());
					if (newNode) { newNode.focus();}
				};
					
				moveFocusRight(newNode);
				Event.preventDefault(ev);
				break;
            case KEY.ENTER:
                this.logger.log('ENTER: ' + newNode.href);
                if (node.href) {
                    if (node.target) {
                        window.open(node.href,node.target);
                    } else {
                        window.location(node.href);
                    }
                } else {
                    node.toggle();
                }
                this.fireEvent('enterKeyPressed',node);
                Event.preventDefault(ev);
                break;
            case KEY.HOME:
                this.logger.log('HOME');
                newNode = this.getRoot();
                if (newNode.children.length) {newNode = newNode.children[0];}
                if (newNode._canHaveFocus()) { newNode.focus(); }
                Event.preventDefault(ev);
                break;
            case KEY.END:
                this.logger.log('END');
                newNode = newNode.parent.children;
                newNode = newNode[newNode.length -1];
                if (newNode._canHaveFocus()) { newNode.focus(); }
                Event.preventDefault(ev);
                break;
            // case KEY.PAGE_UP:
                // this.logger.log('PAGE_UP');
                // break;
            // case KEY.PAGE_DOWN:
                // this.logger.log('PAGE_DOWN');
                // break;
            case 107:  // plus key
                if (ev.shiftKey) {
                    this.logger.log('Shift-PLUS');
                    node.parent.expandAll();
                } else {
                    this.logger.log('PLUS');
                    node.expand();
                }
                break;
            case 109: // minus key
                if (ev.shiftKey) {
                    this.logger.log('Shift-MINUS');
                    node.parent.collapseAll();
                } else {
                    this.logger.log('MINUS');
                    node.collapse();
                }
                break;
            default:
                break;
        }
    }
4360
function (domEvt) {
            var domElt = this.getDom();
            if (this.sendKey(domEvt.charCode, domEvt.keyCode)) {
                domEvt.preventDefault(true);
                domElt.focus();
            }
        }
1274445
function(oEvent) {
			var oTable = this.getTable();
			if (!oTable || TableUtils.getCellInfo(oEvent.target).cell == null) {
				return;
			}
			if (oTable._mTimeouts._cleanupACCExtension) {
				clearTimeout(oTable._mTimeouts._cleanupACCExtension);
				oTable._mTimeouts._cleanupACCExtension = null;
			}
			this.updateAccForCurrentCell("Focus");
		}
777118
function(point, eventName, options){
		if (point){
			var targetElement = elementFromPoint(point, this.focusWindow);
			syn.trigger(targetElement, eventName, options);
		}
	}