8000 [Profiler] Fix text selection on exception pages · symfony/symfony@ff6151b · GitHub
[go: up one dir, main page]

Skip to content

Commit ff6151b

Browse files
committed
[Profiler] Fix text selection on exception pages
1 parent adc39a2 commit ff6151b

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

src/Symfony/Bundle/TwigBundle/Resources/views/base_js.html.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,11 @@
478478
addEventListener(toggles[i], 'click', function(e) {
479479
e.preventDefault();
480480
481+
if ('' !== window.getSelection().toString()) {
482+
/* Don't do anything on text selection */
483+
return;
484+
}
485+
481486
var toggle = e.target || e.srcElement;
482487
483488
/* needed because when the toggle contains HTML contents, user can click */

src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ header .container { display: flex; justify-content: space-between; }
8989
.exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; }
9090

9191
.trace + .trace { margin-top: 30px; }
92-
.trace-head { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
9392
.trace-head .trace-class { color: #222; font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0; position: relative; }
9493
.trace-head .trace-namespace { color: #999; display: block; font-size: 13px; }
9594
.trace-head .icon { position: absolute; right: 0; top: 0; }

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profil 8000 er/base_js.html.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,11 @@
478478
addEventListener(toggles[i], 'click', function(e) {
479479
e.preventDefault();
480480
481+
if ('' !== window.getSelection().toString()) {
482+
/* Don't do anything on text selection */
483+
return;
484+
}
485+
481486
var toggle = e.target || e.srcElement;
482487
483488
/* needed because when the toggle contains HTML contents, user can click */

src/Symfony/Component/Debug/ExceptionHandler.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ public function getStylesheet(FlattenException $exception)
316316
.exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opa 5859 city: .7; }
317317
318318
.trace + .trace { margin-top: 30px; }
319-
.trace-head { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
320319
.trace-head .trace-class { color: #222; font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0; position: relative; }
321320
322321
.trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; }

0 commit comments

Comments
 (0)
0