0

I have an event hooked to backspace keyup on a textbox. I see in IE10 that on select-all you get a close icon. How do I detect that with jquery?

I want to detect event 'Press of (X)' inside the textbox.

enter image description here

change
  • 3,400
  • 7
  • 32
  • 42
  • A "close icon"? That looks like a calendar icon to me. Or do you mean the X? Are you trying to detect whether an icon exists, or whether all of the text in the textbox is selected, or...? – nnnnnn Aug 07 '13 at 02:13
  • Why do you need to detect it? Leave it be? – Brad Aug 07 '13 at 02:27
  • 1
    If you want to hide it: http://stackoverflow.com/questions/13481577/how-can-i-disable-the-clear-button-that-ie10-inserts-into-textboxes – Brian Aug 07 '13 at 02:28
  • Your update is still a bit vague. Are you saying you want to detect when the user clicks the X? – nnnnnn Aug 07 '13 at 02:35
  • @Brad i have a filter attached to this textbox. When user removes all the text, I gotta remove the filter. I have a backspace keyup even attached, need to detect this one now. – change Aug 07 '13 at 02:48
  • @change, You should detect the textbox value change instead, since that is what you really want. Someone can clear this textbox without backspace. Cut, for example. – Brad Aug 07 '13 at 03:12
  • I cannot put it on change because everytime user will change the minute or date (before he has selected the final value he wants), the change event will be triggered. So at this moment I am using a backspace. Will be dealing with 'cut' soon. – change Aug 07 '13 at 03:26
  • What do you mean with "filter"? What does it do? – RoToRa Aug 07 '13 at 09:47
  • filter table rows between start and end date. That is not the point. If i Have to detect this event, is there a way to. Or else I can just disable it. – change Aug 07 '13 at 18:50

0 Answers0