Disabling text selection in polls

poll

(Ryan) #1

Continuing the discussion from A better poll :bar_chart: feature:

You can disable selection in polls with this css:

.poll {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

(Jeff Atwood) #2

No need to be so verbose, we already have a SASS mixin for this.


(Jeff Atwood) #3

Ok good idea, I added this

div.poll {
  @include unselectable;

(Régis Hanol) #4

Thanks :+1: There you go :rabbit2:

https://github.com/discourse/discourse/commit/233cdc011d8f6f04e68581f7427149897e3c4b47


(Régis Hanol) #5

(Jeff Atwood) #6

oh noes! :eyes: DOUBLE UNSELECTABLE!


(Régis Hanol) #7

Does that mean it’s SELECTABLE? :wink: