{"action":"created","issue":{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/795","labels_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/795/comments","events_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/795/events","html_url":"https://github.com/react-bootstrap/react-bootstrap/issues/795","id":85636351,"number":795,"title":"OverlayTrigger with delays can unintentionally leave overlays visible due to focus events.","user":{"login":"ElsewhereGames","id":824558,"avatar_url":"https://avatars.githubusercontent.com/u/824558?v=3","gravatar_id":"","url":"https://api.github.com/users/ElsewhereGames","html_url":"https://github.com/ElsewhereGames","followers_url":"https://api.github.com/users/ElsewhereGames/followers","following_url":"https://api.github.com/users/ElsewhereGames/following{/other_user}","gists_url":"https://api.github.com/users/ElsewhereGames/gists{/gist_id}","starred_url":"https://api.github.com/users/ElsewhereGames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElsewhereGames/subscriptions","organizations_url":"https://api.github.com/users/ElsewhereGames/orgs","repos_url":"https://api.github.com/users/ElsewhereGames/repos","events_url":"https://api.github.com/users/ElsewhereGames/events{/privacy}","received_events_url":"https://api.github.com/users/ElsewhereGames/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/labels/help%20wanted","name":"help wanted","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-05T21:24:48Z","updated_at":"2015-10-21T22:46:25Z","closed_at":null,"body":"If you use a `Tooltip` with an `OverlayTrigger` and specify show and hide delays, there is a way to keep the tool-tip open indefinitely, even after the cursor leaves the OverlayTrigger: Mouse over the trigger, wait for the tool-tip to appear, then rapidly click and drag mouse the cursor off the component. I was able to reproduce this behavior in Chrome, Firefox, and Internet Explorer.\r\n\r\nThis behavior can be demonstrated using the sample code from the documentation:\r\n\r\n```js\r\nconst LinkWithTooltip = React.createClass({\r\n  render() {\r\n    let tooltip = <Tooltip>{this.props.tooltip}</Tooltip>;\r\n\r\n    return (\r\n      <OverlayTrigger placement='top' overlay={tooltip} delayShow={300} delayHide={150}>\r\n        <a href={this.props.href}>{this.props.children}</a>\r\n      </OverlayTrigger>\r\n    );\r\n  }\r\n});\r\n```\r\nPlace this link anywhere, click and drag off the link quickly, and the tooltip will remain open.\r\n\r\nI dove into the OverlayTrigger code a bit, and it seems the mouse click triggers a call to `handleDelayedShow()` (since that gives the wrapped component focus), which sets the `_hoverDelay` property. When `handleDelayedHide()` is invoked right after, it will just call `clearTimeout(this._hoverDelay)` and return, thus keeping the tooltip visible.\r\n\r\nI think this behavior can be disabled by only specifying `hover` as a trigger. Perhaps `focus` should not be a default trigger?\r\n"},"comment":{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/comments/150045887","html_url":"https://github.com/react-bootstrap/react-bootstrap/issues/795#issuecomment-150045887","issue_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/795","id":150045887,"user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T22:46:25Z","updated_at":"2015-10-21T22:46:25Z","body":"I'm not denying that this is buggy, BTW, but I don't think the bug is with the tooltip staying shown - it's with the tooltip hiding if you do this slowly."}}