Text on buttons should not be selectable Rev 2 #4431

Merged
merged 2 commits into from Jun 1, 2012

Projects

None yet

3 participants

@MauriceG
Contributor

Removes the .ui-checkbox label user-select rule for checkboxes and radios
adds user-select: none for ui-btn-text at all

Demo: http://jsfiddle.net/MauriceG/SbFSk/show/
(demo uses own hosted css with this changes applied)

@jaspermdegroot
Member

hi @MauriceG

The demonstrate the point I tried to make about listviews (see #4373) look at those two fiddles:

http://jsfiddle.net/B9QG3/5/show/ - This one loads current CSS. When I click in front of a movie I can select the text. Now I can right click and copy that title or in Chrome I can search Google for that movie (and I can read about it on IMDb.com in only two clicks :-) )
http://jsfiddle.net/B9QG3/4/show/ - This one loads your CSS. Now I am no longer able to do what I described above.

The type of content listviews are used for is different from the other buttons types, so IMHO we should make an exception for this.

@MauriceG
Contributor

Hi @uGoMobi
I've to say, that I was trying to avoid that selectable text in a listview also...
The "two-click-convenient-google-search" you described, works just in some desktop browsers, only with inset lists, and only one word is selected when clicking. Okay, with Safari on Win I can right click the text in a list item and the whole text is selected, but this I've tried to avoid cause it looks a bit odd.

@jaspermdegroot
Member

Hi @MauriceG !

I understand it was your intention to apply to this listview buttons as well :-)
Also, I totally agree it looks odd. My opinion was based on usability only.
I did some more testing with this and have to admit that in many situations it is difficult to select just one list item.
After all it turns out my usability argument isn't very strong. I changed my mind and agree with you now that we should disable user-select for all buttons.

@MauriceG
Contributor
MauriceG commented Jun 1, 2012

Hi @uGoMobi !
I also have to admit that the usability you've described could by convenient sometimes, but it's may really on edge case, I think.
Thanks for testing and for your straight answer!
Maurice

@jaspermdegroot
Member

@toddparker

Summary: This PR from @MauriceG does exactly what you requested (#4373 (comment)). It won't affect read-only lists items, now or after we changed those in 1.2.
I started a discussion about excluding listview buttons from the rule, but changed my mind.
Ok to merge?

@toddparker
Contributor

I think this is ok to merge, yes.

@jaspermdegroot jaspermdegroot merged commit 8c7b8d4 into jquery:master Jun 1, 2012
@MauriceG
Contributor
MauriceG commented Jun 1, 2012

Hi @uGoMobi !
Thanks for having an eye on this!
Hartelijk dank!
Maurice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment