Commit cea485a
Close tooltip automatically if anchor is removed
The css solution works when scrolling/moving the anchor outside of the viewport.
The mutation observer is needed when the tooltip can't be nested as a child of the anchor and is removed from the DOM while the tooltip is still open. A use-case for this is the editing of a css selector, while the specificity tooltip is still visible, see http://crrev/c/6298060.
Demo: https://screencast.googleplex.com/cast/NDgzNjA0OTc1MzczNTE2OHxlYzllMmU0MC0yMA
Change-Id: I3092910abb8eb397cd2ba0fe0d01dd721ecfd4ff
Bug: 399801002
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6308773
Reviewed-by: Philip Pfaffe <[email protected]>
Reviewed-by: Danil Somsikov <[email protected]>
Commit-Queue: Marcel Pütz <[email protected]>1 parent 962f5d7 commit cea485a
File tree
4 files changed
+49
-4
lines changed- front_end/ui/components
- docs/tooltip
- tooltip
4 files changed
+49
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | | - | |
38 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
| |||
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
47 | | - | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
124 | 136 | | |
125 | 137 | | |
126 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
| 216 | + | |
214 | 217 | | |
215 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
216 | 240 | | |
217 | 241 | | |
218 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments