GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
While scrolling chart by clicking arrow buttons, repeating this action couple of times per second or faster, there is undesired effect of text selection, as seen here:
At least it appears so in Chrome. To fix this, I searched for <span role="button" ... /> and replaced with <button ... /> (20 replacements in the latest version). I tested it locally and seems that it works in Chrome 23 without the flickering selection effect.
Yeah cool, I'll look into it. For future reference user-select: none; might also help out?
Thanks, that might help too, however this property isn't in standards yet. I tried user-select: none; and it didn't work in Chrome. Changed to -webkit-user-select: none; and it worked fine.
Googled more info about user-select here: http://css-tricks.com/almanac/properties/u/user-select/
Heh, if I had a dollar for every vendor prefix I used I would be a rich man
indeed. The code base has much bigger problems than that ;)
Sent from my iPhone
On 18/12/2012, at 7:49 PM, Andrejs Semovs email@example.com wrote:
Thanks, that might help too, however this property isn't in standards yet.
I tried user-select: none; and it didn't work in Chrome. I tried
none; and it worked fine.
Googled more info about user-select here:
Reply to this email directly or view it on
Upvote for this fix to be merged in a new build.
I agree that the best fix would be a simple find-replace of <span role="button" ... /> with <button type="button" ... />. Pull request, anyone? @andrejs ?
<span role="button" ... />
<button type="button" ... />
Yes, I could fork, replace to <button type="button" ... /> and make pull request sometime next week.
That would be great, thanks!
Seems the selection-on-rapid-button-clicking issue specifically should be fixed since #101 was merged into master, though did we want to keep this open as a reminder to maybe use [-vendor-]user-select as a solution to the more general problem?
(Just to recap: The issue before was that buttons were represented by spans, which was semantically incorrect, and so the browser thought selecting button text and surrounding elements on double-click was fine. The remaining, though less common, issue is that most of the elements of the Gantt should probably not be selectable/highlightable at all.. Discuss?)
Closing because the original issue has been fixed and there's been no further discussion about using user-select in the CSS, which is a separate, more general (though minor) issue anyway.