(event: Event)
| 95 | }; |
| 96 | |
| 97 | const outHandler = (event: Event) => { |
| 98 | const wrapper = findLinkWrapper(event.target); |
| 99 | if (!wrapper) |
| 100 | return; |
| 101 | |
| 102 | // Ignore mouseout when the pointer is still inside the same wrapper |
| 103 | // (e.g. crossing between a `<strong>` and the surrounding text child). |
| 104 | // Without this guard the popover hides every time the pointer crosses |
| 105 | // an internal element boundary. |
| 106 | if (event instanceof MouseEvent) { |
| 107 | const { relatedTarget } = event; |
| 108 | if (relatedTarget instanceof Node && wrapper.contains(relatedTarget)) |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | eventCenter.emit('muya-link-tools', { reference: null }); |
| 113 | }; |
| 114 | |
| 115 | const clickHandler = (event: Event) => { |
| 116 | if (!(event.target instanceof HTMLElement)) |
nothing calls this directly
no test coverage detected