Thanks to visit codestin.com
Credit goes to github.com

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

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

merged 2 commits into from
May 31, 2017

Conversation

ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented May 30, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #22957, #22978
License MIT
Doc PR N/A

I don't really know the purpose of this css rule here, but I admit it's quite frustrating not to be able to select something here.

This PR also prevents the following annoying behavior (selecting text collapses/uncollapses traces):
mai-30-2017 18-26-29

About the trick used, I think the browser support is safe enough: https://caniuse.com/#search=window.getSelection

EDIT: new commit added which allows to fix #22978

@javiereguiluz
Copy link
Member

Pelease dont merge this yet. Thanks.

@javiereguiluz
Copy link
Member

Sorry about my last comment, but I wasn't at the computer and I couldn't explain myself. The reason I disabled the selection is that when you click the trace header to collapse/expand it, random parts of it are selected by the browser:

expcetion-selection

Is there any way to enable selecting text but disabling that undesired random selection? Thanks!

@ogizanagi
Copy link
Contributor Author

ogizanagi commented May 31, 2017

You don't need to apologize!
However, that's really weird. I tried on my own laptop, using chrome, safari and firefox, but I don't get such random selection by simply clicking on the header for collapsing (except when double-clicking, but that's the normal behavior) :/

Can someone else try on his side?

@ogizanagi
Copy link
Contributor Author

Oh, but re-considering your gif, that's indeed because you're toggling it quite fast, so it's considered a double-click by the browser.
I'd say it should not really happen in normal usage of the page. You're not likely to collapse/uncollapse everything like this. However, you're likely to need to select and copy the exception or message 😄

@javiereguiluz
Copy link
Member

OK ... and have you tried collapsing/expanding each line of the trace? Because I remember having issues with that too: the entire line was selected and looked ugly.

In any case, 👍 from me if you have reviewed this and it works as expected.

@ogizanagi
Copy link
Contributor Author

ogizanagi commented May 31, 2017

I've just tried. Nothing to report. Maybe the issues you're talking about were more prominent and annoying in a first version of the redesigned page, but now the result is really satisfying to me :)
The only issue I still get by expanding everything is the one I suggested to fix in #22971. Sometime it gets entirely out of my screen.

@javiereguiluz
Copy link
Member

Yes, but I thought the error reported in #22971 was fixed and merged in another PR. It was the first thing some people notice with the redesign and there was a PR for that. I can't find it now.

@ogizanagi ogizanagi changed the title [Profiler] Fix text selection on exception pages [Profiler] Fix text selection & click on file links on exception pages May 31, 2017
@nicolas-grekas nicolas-grekas added this to the 3.3 milestone May 31, 2017
@fabpot
Copy link
Member

fabpot commented May 31, 2017

Thank you @ogizanagi.

@fabpot fabpot merged commit 8618399 into symfony:3.3 May 31, 2017
fabpot added a commit that referenced this pull request May 31, 2017
…eption pages (ogizanagi)

This PR was squashed before being merged into the 3.3 branch (closes #22968).

Discussion
----------

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

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22957, #22978 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

I don't really know the purpose of this css rule here, but I admit it's quite frustrating not to be able to select something here.

This PR also prevents the following annoying behavior (selecting text collapses/uncollapses traces):
![mai-30-2017 18-26-29](https://cloud.githubusercontent.com/assets/2211145/26593977/3afbc510-4566-11e7-9114-8934ba6126a2.gif)

About the trick used, I think the browser support is safe enough: https://caniuse.com/#search=window.getSelection

EDIT: new commit added which allows to fix #22978

Commits
-------

8618399 [Profiler] Fix clicking on links inside toggle
ff6151b [Profiler] Fix text selection on exception pages
@ogizanagi ogizanagi deleted the fix/profiler/text_selection branch May 31, 2017 17:45
@fabpot fabpot mentioned this pull request Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants