Sends the message containing tagID which is being clicked
to the editor in order to change the cursor position to
the HTML tag corresponding to the clicked element.
199612
function onDocumentClick(event) {
        var element = event.target;
        if (element && element.hasAttribute('data-brackets-id')) {
            MessageBroker.send({"tagId": element.getAttribute('data-brackets-id')});
        }
    }
371386
function startTagInSelectInTable(p, token) {
    const tn = token.tagName;

    if (
        tn === $.CAPTION ||
        tn === $.TABLE ||
        tn === $.TBODY ||
        tn === $.TFOOT ||
        tn === $.THEAD ||
        tn === $.TR ||
        tn === $.TD ||
        tn === $.TH
    ) {
        p.openElements.popUntilTagNamePopped($.SELECT);
        p._resetInsertionMode();
        p._processToken(token);
    } else {
        startTagInSelect(p, token);
    }
}
723601
function sendButton(ev) {
    var button
      , pos;

    // get the xterm-style button
    button = getButton(ev);

    // get mouse coordinates
    pos = getCoords(ev);
    if (!pos) return;

    sendEvent(button, pos);

    switch (ev.type) {
      case 'mousedown':
        pressed = button;
        break;
      case 'mouseup':
        // keep it at the left
        // button, just in case.
        pressed = 32;
        break;
      case wheelEvent:
        // nothing. don't
        // interfere with
        // `pressed`.
        break;
    }
  }
986641
function(_event){
                var _code = _event.keyCode;
                if (_code === 65 && _event[SELECT_ALL_MODIFIER] && !_event.shiftKey && !_event.altKey || // Ctrl-A or Cmd-A
                    _code >= 37 && _code <= 40 || // arrow key
                    _event.ctrlKey && MAC && MAC_MOVE_KEYS.indexOf(_code) >= 0) {
                  if (!HAS_OWN_SELECTION[_event.target.tagName]) {
                    setTimeout(_dispatchIfChanged.bind(null, this), 0);
                  }
                }
            }
931320
function appendTag( elem ) {
		var parent;
		// no parent or parent is a root = we're at the top level -> try to add to body
		if ( !elem.parent || elem.parent.type === 'root' ) {
			parent = find( destChildren, 'html' );

			if ( parent ) {
				parent = find( parent.children, 'body' );
			}

			if ( parent ) {
				utils.appendChild( parent, elem );
			} else {
				// append the element to the destination
				utils.append( destChildren[ destChildren.length - 1 ], elem );
			}
			// append the element to the destination
		} else {
			utils.append( destChildren[ destChildren.length - 1 ], elem );
		}
	}
131008
function moveCursorToEnd(el) { // Courtesy of http://css-tricks.com/snippets/javascript/move-cursor-to-end-of-input/
			if (typeof el.selectionStart == "number")
				el.selectionStart = el.selectionEnd = el.value.length;
			else if (typeof el.createTextRange != "undefined") {
				el.focus();
				var range = el.createTextRange();
				range.collapse(false);
				range.select();
			}
		}
1207844
def _add_event_in_element(self, element, event):
        

        if not self.main_script_added:
            self._generate_main_scripts()

        if self.script_list is not None:
            self.id_generator.generate_id(element)
            self.script_list.append_text(
                event
                + "Elements.push('"
                + element.get_attribute('id')
                + "');"
            )
260494
function() {
            var target;
            $('a[href^="#"]').not('.pldoc-tab-wrapper .pldoc-link').on('click', function(event) {
                event.preventDefault();

                target = $(event.currentTarget).attr('href');

                $('html, body').stop().animate({
                    scrollTop: $(target).offset().top
                }, 1000, 'swing', function() {
                    Ui.sendFocus(target);
                });
            });
        }
1065857
function onRowLinkClick( event ) {
  let target = event.target;
  if ( target && target.tagName === 'A' ) {
    return;
  }
  target = closest( event.target, 'tr' );
  const link = target.querySelector( 'a' );
  if ( link ) {
    window.location = link.getAttribute( 'href' );
  }
}
184104
function(element) {
    if (!(element && element.nodeType === 1)) {
      return;
    }
    if (_currentElement) {
      _removeClass(_currentElement, _globalConfig.activeClass);
      if (_currentElement !== element) {
        _removeClass(_currentElement, _globalConfig.hoverClass);
      }
    }
    _currentElement = element;
    _addClass(element, _globalConfig.hoverClass);
    var newTitle = element.getAttribute("title") || _globalConfig.title;
    if (typeof newTitle === "string" && newTitle) {
      var htmlBridge = _getHtmlBridge(_flashState.bridge);
      if (htmlBridge) {
        htmlBridge.setAttribute("title", newTitle);
      }
    }
    var useHandCursor = _globalConfig.forceHandCursor === true || _getStyle(element, "cursor") === "pointer";
    _setHandCursor(useHandCursor);
    _reposition();
  }
466594
function() {
      var value = this.getValue();
      this.editorContainer.style.display = '';
      this.formattedContainer.style.display = 'none';
   
      if(!lang.isUndefined(value)) {
         this.editorField.setValue(value);   
      }
      
      // Set focus in the element !
      this.editorField.focus();
   
      // Select the content
      if(this.editorField.el && lang.isFunction(this.editorField.el.setSelectionRange) && (!!value && !!value.length)) {
         this.editorField.el.setSelectionRange(0,value.length);
      }
      
   }
1064313
function(value, sendUpdatedEvt) {
	   this.el.value = value;
		
		if(this.oButton) {
			this.oButton.set("value", value);
			var el = Dom.get(this.labelElId);
			if(el) {
				Dom.setStyle(el, "backgroundColor", value);
				el.innerHTML = "Current color is " + value;
			}
			else {
				Event.onAvailable(this.labelElId, function() {
					Dom.setStyle(this, "backgroundColor", value);
					this.innerHTML = "Current color is " + value;
				});
			}
		}
	
		if(this.oColorPicker) {
			this.oColorPicker.set("hex", value.substr(1));
		}

		// Call Field.setValue to set class and fire updated event
		inputEx.ColorPickerField.superclass.setValue.call(this,value, sendUpdatedEvt);
	}
1307852
function (elementId) {
      var element = this.getElement(elementId);
      var errObj = new ERROR.UnknownError(
        'elementId ' + elementId + ' could not be tapped');
      if (element !== null) {
        try {
          // element may still be null.
          element.tap();
        } catch (e) {
          if (e.message.indexOf("(null)") !== -1) {
            try {
              $.target().tap(element.rect());
            } catch (e2) {
              throw errObj;
            }
          } else {
            throw errObj;
          }
        }
      } else {
        throw new ERROR.UnknownError(
          'elementId ' + elementId + ' is null and can\'t be tapped.');
      }
    }
679907
def enter_text_with_id(textfield_id, value, opts = {})
        
        if opts.nil? || opts.empty? 
          opts[:appending] = true
        end
        
        perform_operation {
          elements = find_elements(:id, textfield_id)
          if elements.size == 1 then
            the_element = elements[0]
            the_element.clear unless opts[:appending]
            the_element.send_keys(value)            
          else
            smaller_set = elements.select {|x| x.tag_name == "textarea" || (x.tag_name == "input" &&  x.attribute("text")) }
            the_element = smaller_set[0]
            the_element.clear unless opts[:appending]
            the_element.send_keys(value)
          end
        }
      end
767701
function startTagBeforeHead(p, token) {
    const tn = token.tagName;

    if (tn === $.HTML) {
        startTagInBody(p, token);
    } else if (tn === $.HEAD) {
        p._insertElement(token, NS.HTML);
        p.headElement = p.openElements.current;
        p.insertionMode = IN_HEAD_MODE;
    } else {
        tokenBeforeHead(p, token);
    }
}
1275623
private void call(final Element e, final String arg) {
        JQuery.jQuery(e).tooltip(arg);
    }
528281
public void setHtml(String html) {
        this.html = html;

        if (widget != null) {
            if (widget.isAttached()) {
                tooltipElement.find("span")
                        .html(html != null ? html : "");
            } else {
                widget.addAttachHandler(event ->
                        tooltipElement.find("span")
                                .html(html != null ? html : ""));
            }
        } else {
            GWT.log("Please initialize the Target widget.", new IllegalStateException());
        }
    }