0

I have a span-element that has an onclick-property that calles a javascript function (it is a zoom-button).

Everything is working properly, but when quickly clicking two or three times in a row on the "button", some random other elements get selected (blue selection).

When I make the spans as "" or the style changes, so I don't want that.

What else can I do to avoid the selection effect?

(btw in google music the same problem appears, when clicking the next or previous-buttons (< or >) in the "recent activity"-section.)

  • 1
    Perhaps this post will be of some use: [CSS rule to disable text selection highlighting](http://stackoverflow.com/questions/826782/css-rule-to-disable-text-selection-highlighting) – Lix Jun 14 '15 at 14:10
  • @Lix, was just going to post that link :) – AmmarCSE Jun 14 '15 at 14:10
  • @AmmarCSE - you got nothing on my copy pasta ;) – Lix Jun 14 '15 at 14:12
  • Another thing to look at, @andreas, is why your users are needing to tap the zoom button so many times. Perhaps the hit-box is a little to small or the actual zoom percentage is not large enough. This might be a good stage to re-evaluate that specific UX issue. Perhaps a zoom slider? – Lix Jun 14 '15 at 14:14
  • Thank you Lix, that fixed my problem! :) The zooming is for a day-calendar, where it changes the duration of one line (15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours). If I made a slider, there would be random durations which i don't want. – Andreas Morgta Jun 14 '15 at 14:17

0 Answers0