MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / handleDocumentClick

Function handleDocumentClick

src/TooltipPopoverWrapper.js:121–150  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

119 }
120
121 handleDocumentClick(e) {
122 const triggers = this.props.trigger.split(' ');
123
124 if (
125 triggers.indexOf('legacy') > -1 &&
126 (this.props.isOpen || isInDOMSubtrees(e.target, this._targets))
127 ) {
128 if (this._hideTimeout) {
129 this.clearHideTimeout();
130 }
131 if (this.props.isOpen && !isInDOMSubtree(e.target, this._popover)) {
132 this.hideWithDelay(e);
133 } else if (!this.props.isOpen) {
134 this.showWithDelay(e);
135 }
136 } else if (
137 triggers.indexOf('click') > -1 &&
138 isInDOMSubtrees(e.target, this._targets)
139 ) {
140 if (this._hideTimeout) {
141 this.clearHideTimeout();
142 }
143
144 if (!this.props.isOpen) {
145 this.showWithDelay(e);
146 } else {
147 this.hideWithDelay(e);
148 }
149 }
150 }
151
152 onMouseOverTooltipContent() {
153 if (this.props.trigger.indexOf('hover') > -1 && !this.props.autohide) {

Callers

nothing calls this directly

Calls 2

isInDOMSubtreesFunction · 0.85
isInDOMSubtreeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…