question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Text should be selectable by default

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

Current behavior

Unable to select text within the table

Expected behavior

User should select (and copy) text as normal browser behavior

What is the motivation / use case for changing the behavior?

Setting .ngx-datatable .data-table-body-cell { user-select: none } seems highly opinionated. As it’s a simple CSS rule, it should be left up to the user. Forcing the developer to overwrite it to return default behavior is counter-intuitive.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
elvisbegoviccommented, Feb 9, 2017

@rickdroio

/* allow selection  */
:host /deep/ .datatable .datatable-body-cell{
  -webkit-user-select: initial!important;
  -moz-user-select: initial!important;
  -ms-user-select: initial!important;
  -o-user-select: initial!important;
  user-select:initial!important; }
2reactions
tzejohncommented, Feb 17, 2017

@istiti I had to change the class from .datatable to .ngx-datatable to get it to work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default text which won't be shown in drop-down list
9 Answers 9 · Add an option element as the first child of the select · Set value = "" to that option...
Read more >
What's the Best Way to Show Default Text in HTML Select?
The best way to show default text in an HTML select dropdown is by using a combination of selected , disabled and hidden...
Read more >
How to set the default value for an HTML <select> element
The default value of the select element can be set by using the 'selected' attribute on the required option. This is a boolean...
Read more >
Allow text to be selectable by default on the web · Issue #74871
Use case Text on desktop websites is generally selectable. You'll notice this on all popular websites (google, amazon, youtube, facebook).
Read more >
user-select - CSS: Cascading Style Sheets - MDN Web Docs
The user-select CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found