8000 [Profiler] Fix text selection & click on file links on exception pages by ogizanagi · Pull Request #22968 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Profiler] Fix text selection & click on file links on exception pages #22968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Profiler] Fix text selection on exception pages
  • Loading branch information
ogizanagi committed May 30, 2017
commit ff6151b15f69b5b519cf10d675a9cc6b085af97b
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@
addEventListener(toggles[i], 'click', function(e) {
e.preventDefault();

if ('' !== window.getSelection().toString()) {
/* Don't do anything on text selection */
return;
}

var toggle = e.target || e.srcElement;

/* needed because when the toggle contains HTML contents, user can click */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ header .container { display: flex; justify-content: space-between; }
.exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; }

.trace + .trace { margin-top: 30px; }
.trace-head { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.trace-head .trace-class { color: #222; font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0; position: relative; }
.trace-head .trace-namespace { color: #999; display: block; font-size: 13px; }
.trace-head .icon { position: absolute; right: 0; top: 0; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@
addEventListener(toggles[i], 'click', function(e) {
e.preventDefault();

if ('' !== window.getSelection().toString()) {
/* Don't do anything on text selection */
return;
}

var toggle = e.target || e.srcElement;

/* needed because when the toggle contains HTML contents, user can click */
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Component/Debug/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ public function getStylesheet(FlattenException $exception)
.exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; }

.trace + .trace { margin-top: 30px; }
.trace-head { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.trace-head .trace-class { color: #222; font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0; position: relative; }

.trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; }
Expand Down
0