We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b041d commit d5c513eCopy full SHA for d5c513e
html-api-debugger/view.js
@@ -267,9 +267,17 @@ const store = createStore(NS, {
267
268
/** @param {MouseEvent} e */
269
handleSpanOver(e) {
270
- const t = /** @type {HTMLElement} */ (e.target);
271
- const { spanStart, spanLength } = t.dataset;
272
- if (!t || !spanStart || !spanLength) {
+ const target = /** @type {HTMLElement} */ (e.target);
+ /** @type {HTMLElement|null} */
+ const spanElement = target.dataset['spanStart']
273
+ ? target
274
+ : target.closest('[data-span-start]');
275
+
276
+ if (!spanElement) {
277
+ return;
278
+ }
279
+ const { spanStart, spanLength } = spanElement.dataset;
280
+ if (!spanStart || !spanLength) {
281
return;
282
}
283
0 commit comments