8000 Merge branch '7.1' into 7.2 · symfony/web-profiler-bundle@cd60cb3 · GitHub
[go: up one dir, main page]

Skip to content

Commit cd60cb3

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: (27 commits) add translations for the Slug constraint [Messenger] Fix `TransportMessageIdStamp` not always added [DoctrineBridge] Fix compatibility to Doctrine persistence 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3 [PropertyInfo] Fix add missing composer conflict [ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances [VarDumper] Fix displaying closure's "this" from anonymous classes [Doctrine][Messenger] Prevents multiple TransportMessageIdStamp being stored in envelope [HttpKernel] Don't override existing LoggerInterface autowiring alias in LoggerPass reject inline notations followed by invalid content [Security] Fix triggering session tracking from ContextListener [AssetMapper] add leading slash to public prefix fix: modify Exception message parameter order [Yaml] Fix parsing of unquoted strings in Parser::lexUnquotedString() to ignore spaces Update exception.css Remove outdated guard from security xsd schema Bump Symfony version to 7.1.11 Update VERSION for 7.1.10 Update CHANGELOG for 7.1.10 Bump Symfony version to 6.4.18 Update VERSION for 6.4.17 ...
2 parents d1801c3 + 328b272 commit cd60cb3

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

Resources/views/Profiler/base_js.html.twig

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,19 @@
173173
}
174174
175175
toggle.addEventListener('click', (e) => {
176+
const toggle = e.currentTarget;
177+
178+
if (e.target.closest('a, .sf-toggle') !== toggle) {
179+
return;
180+
}
181+
176182
e.preventDefault();
177183
178184
if ('' !== window.getSelection().toString()) {
179185
/* Don't do anything on text selection */
180186
return;
181187
}
182188
183-
/* needed because when the toggle contains HTML contents, user can click */
184-
/* on any of those elements instead of their parent '.sf-toggle' element */
185-
const toggle = e.target.closest('.sf-toggle');
186189
const element = document.querySelector(toggle.getAttribute('data-toggle-selector'));
187190
188191
toggle.classList.toggle('sf-toggle-on');
@@ -205,14 +208,6 @@
205208
toggle.innerHTML = currentContent !== altContent ? altContent : originalContent;
206209
});
207210
208-
/* Prevents from disallowing clicks on links inside toggles */
209-
const toggleLinks = toggle.querySelectorAll('a');
210-
toggleLinks.forEach((toggleLink) => {
211-
toggleLink.addEventListener('click', (e) => {
212-
e.stopPropagation();
213-
});
214-
});
215-
216211
toggle.setAttribute('data-processed', 'true');
217212
});
218213
}

0 commit comments

Comments
 (0)
0