Jeoff Wilks
2006-May-23 14:14 UTC
Autocompleter - up arrow moves cursor to start of input box
When using the autocompleter and scrolling through options, if you press the up arrow key the input field cursor moves backward. Some of my users have reported that they find this very distracting. Does anyone know why this happens, or where in the code I could fix it? Steps to recreate: 1. Go to http://demo.script.aculo.us/ajax/autocompleter 2. Type in a letter (or two or three) 3. Arrow down through a few of the choices 4. Now arrow up, and observe: the text input field cursor moves backward.
Daniel Elmore
2006-May-23 14:25 UTC
RE: Autocompleter - up arrow moves cursor to start ofinput box
Go into any input box and press the up key, your cursor will move backwards, its part of the basic nav. system. You can counter this effect in IE by changing the value of the input field, say by: Field.value = Field.value + ''''; Tag that to your onkeyup event. As for FF, I haven''t found any solution. Let me know if you find one. -Daniel Elmore -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff Wilks Sent: Tuesday, May 23, 2006 9:15 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Autocompleter - up arrow moves cursor to start ofinput box When using the autocompleter and scrolling through options, if you press the up arrow key the input field cursor moves backward. Some of my users have reported that they find this very distracting. Does anyone know why this happens, or where in the code I could fix it? Steps to recreate: 1. Go to http://demo.script.aculo.us/ajax/autocompleter 2. Type in a letter (or two or three) 3. Arrow down through a few of the choices 4. Now arrow up, and observe: the text input field cursor moves backward. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Jeoff Wilks
2006-May-23 14:42 UTC
Re: Autocompleter - up arrow moves cursor to start ofinput box
Thanks for the quick response.> Go into any input box and press the up key, your cursor will move backwards, > its part of the basic nav. system.I tried pressing the up arrow in the Google.com search box, my Ameritrade quote box, and on a RoR Trac ticket page. None of them move the cursor backwards on key-up. (I tested in IE 6, Firefox 1.5, and IE 7b2). Can you provide an example of a web page that does that? Or are you saying, "If and only if you attach to Event.KEY_UP, the input field will start responding on its own as well." Something doesn''t seem right about that... I''ll keep looking through the autocompleter code to see if I can dig something up, but I''d appreciate any further ideas or commentary. On 5/23/06, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Go into any input box and press the up key, your cursor will move backwards, > its part of the basic nav. system. > > You can counter this effect in IE by changing the value of the input field, > say by: > > Field.value = Field.value + ''''; > > Tag that to your onkeyup event. > > As for FF, I haven''t found any solution. Let me know if you find one. > > > -Daniel Elmore > > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff > Wilks > Sent: Tuesday, May 23, 2006 9:15 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Autocompleter - up arrow moves cursor to start > ofinput box > > When using the autocompleter and scrolling through options, if you > press the up arrow key the input field cursor moves backward. Some of > my users have reported that they find this very distracting. Does > anyone know why this happens, or where in the code I could fix it? > > Steps to recreate: > 1. Go to http://demo.script.aculo.us/ajax/autocompleter > 2. Type in a letter (or two or three) > 3. Arrow down through a few of the choices > 4. Now arrow up, and observe: the text input field cursor moves backward. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Martinez, Andrew
2006-May-23 14:46 UTC
RE: Autocompleter - up arrow moves cursor to startofinput box
You might be able to stop the default event behavior. I would assume it would be onKeyPress or onKeyDown since those repeate. You would just have to stop the event when you see it by watching the input text box. -Andrew Martinez -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff Wilks Sent: Tuesday, May 23, 2006 10:43 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Autocompleter - up arrow moves cursor to startofinput box Thanks for the quick response.> Go into any input box and press the up key, your cursor will move backwards, > its part of the basic nav. system.I tried pressing the up arrow in the Google.com search box, my Ameritrade quote box, and on a RoR Trac ticket page. None of them move the cursor backwards on key-up. (I tested in IE 6, Firefox 1.5, and IE 7b2). Can you provide an example of a web page that does that? Or are you saying, "If and only if you attach to Event.KEY_UP, the input field will start responding on its own as well." Something doesn''t seem right about that... I''ll keep looking through the autocompleter code to see if I can dig something up, but I''d appreciate any further ideas or commentary. On 5/23/06, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Go into any input box and press the up key, your cursor will move backwards, > its part of the basic nav. system. > > You can counter this effect in IE by changing the value of the input field, > say by: > > Field.value = Field.value + ''''; > > Tag that to your onkeyup event. > > As for FF, I haven''t found any solution. Let me know if you find one. > > > -Daniel Elmore > > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff > Wilks > Sent: Tuesday, May 23, 2006 9:15 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Autocompleter - up arrow moves cursor to start > ofinput box > > When using the autocompleter and scrolling through options, if you > press the up arrow key the input field cursor moves backward. Some of > my users have reported that they find this very distracting. Does > anyone know why this happens, or where in the code I could fix it? > > Steps to recreate: > 1. Go to http://demo.script.aculo.us/ajax/autocompleter > 2. Type in a letter (or two or three) > 3. Arrow down through a few of the choices > 4. Now arrow up, and observe: the text input field cursor moves backward. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Daniel Elmore
2006-May-23 15:16 UTC
RE: Autocompleter - up arrow moves cursor to startofinput box
> I tried pressing the up arrow in the Google.com search box...You''re right. I don''t know what I was thinking. I just did a second round of tests (I don''t know what happen on the first round :@). Results... IE: Doesn''t have the problem at all. Can you confirm? FF: Only has the problem when the autocomplete="off" attribute is specified. Can you confirm? Daniel Elmore -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff Wilks Sent: Tuesday, May 23, 2006 9:43 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Autocompleter - up arrow moves cursor to startofinput box Thanks for the quick response.> Go into any input box and press the up key, your cursor will movebackwards,> its part of the basic nav. system.I tried pressing the up arrow in the Google.com search box, my Ameritrade quote box, and on a RoR Trac ticket page. None of them move the cursor backwards on key-up. (I tested in IE 6, Firefox 1.5, and IE 7b2). Can you provide an example of a web page that does that? Or are you saying, "If and only if you attach to Event.KEY_UP, the input field will start responding on its own as well." Something doesn''t seem right about that... I''ll keep looking through the autocompleter code to see if I can dig something up, but I''d appreciate any further ideas or commentary. On 5/23/06, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Go into any input box and press the up key, your cursor will movebackwards,> its part of the basic nav. system. > > You can counter this effect in IE by changing the value of the inputfield,> say by: > > Field.value = Field.value + ''''; > > Tag that to your onkeyup event. > > As for FF, I haven''t found any solution. Let me know if you find one. > > > -Daniel Elmore > > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff > Wilks > Sent: Tuesday, May 23, 2006 9:15 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Autocompleter - up arrow moves cursor to start > ofinput box > > When using the autocompleter and scrolling through options, if you > press the up arrow key the input field cursor moves backward. Some of > my users have reported that they find this very distracting. Does > anyone know why this happens, or where in the code I could fix it? > > Steps to recreate: > 1. Go to http://demo.script.aculo.us/ajax/autocompleter > 2. Type in a letter (or two or three) > 3. Arrow down through a few of the choices > 4. Now arrow up, and observe: the text input field cursor moves backward. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Jeoff Wilks
2006-May-23 15:57 UTC
Re: Autocompleter - up arrow moves cursor to startofinput box
> IE: Doesn''t have the problem at all. Can you confirm?Yes, my mistake, the cursor does not move in IE.> FF: Only has the problem when the autocomplete="off" attribute is specified. > Can you confirm?In FF, the cursor moves on key_up whether I have autocomplete="off" or autocomplete="on" or just leave out the autocomplete attribute altogether. (FYI- using Scriptaculous 1.5.2. I looked through recent checkins on controls.js but they looked unrelated.) On 5/23/06, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I tried pressing the up arrow in the Google.com search box... > You''re right. I don''t know what I was thinking. > > I just did a second round of tests (I don''t know what happen on the first > round :@). > > Results... > > IE: Doesn''t have the problem at all. Can you confirm? > > FF: Only has the problem when the autocomplete="off" attribute is specified. > Can you confirm? > > > Daniel Elmore > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff > Wilks > Sent: Tuesday, May 23, 2006 9:43 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Autocompleter - up arrow moves cursor to > startofinput box > > Thanks for the quick response. > > > Go into any input box and press the up key, your cursor will move > backwards, > > its part of the basic nav. system. > > I tried pressing the up arrow in the Google.com search box, my > Ameritrade quote box, and on a RoR Trac ticket page. None of them move > the cursor backwards on key-up. (I tested in IE 6, Firefox 1.5, and IE > 7b2). Can you provide an example of a web page that does that? > > Or are you saying, "If and only if you attach to Event.KEY_UP, the > input field will start responding on its own as well." Something > doesn''t seem right about that... I''ll keep looking through the > autocompleter code to see if I can dig something up, but I''d > appreciate any further ideas or commentary. > > > On 5/23/06, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Go into any input box and press the up key, your cursor will move > backwards, > > its part of the basic nav. system. > > > > You can counter this effect in IE by changing the value of the input > field, > > say by: > > > > Field.value = Field.value + ''''; > > > > Tag that to your onkeyup event. > > > > As for FF, I haven''t found any solution. Let me know if you find one. > > > > > > -Daniel Elmore > > > > > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff > > Wilks > > Sent: Tuesday, May 23, 2006 9:15 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails-spinoffs] Autocompleter - up arrow moves cursor to start > > ofinput box > > > > When using the autocompleter and scrolling through options, if you > > press the up arrow key the input field cursor moves backward. Some of > > my users have reported that they find this very distracting. Does > > anyone know why this happens, or where in the code I could fix it? > > > > Steps to recreate: > > 1. Go to http://demo.script.aculo.us/ajax/autocompleter > > 2. Type in a letter (or two or three) > > 3. Arrow down through a few of the choices > > 4. Now arrow up, and observe: the text input field cursor moves backward. > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Daniel Elmore
2006-May-23 18:37 UTC
RE: Autocompleter - up arrow moves cursor tostartofinput box
Okay I figured this out. There is a line in the autocomplete base constructor that reads: This.element.setAttribute(''autocomplete'',''off''); Comment that out and the problem is fixed in FF. Isn''t IE the only one that uses the autocomplete attribute? If so, you don''t need that line there for FF viewers. What do you think? -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff Wilks Sent: Tuesday, May 23, 2006 10:57 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Autocompleter - up arrow moves cursor tostartofinput box> IE: Doesn''t have the problem at all. Can you confirm?Yes, my mistake, the cursor does not move in IE.> FF: Only has the problem when the autocomplete="off" attribute isspecified.> Can you confirm?In FF, the cursor moves on key_up whether I have autocomplete="off" or autocomplete="on" or just leave out the autocomplete attribute altogether. (FYI- using Scriptaculous 1.5.2. I looked through recent checkins on controls.js but they looked unrelated.) On 5/23/06, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I tried pressing the up arrow in the Google.com search box... > You''re right. I don''t know what I was thinking. > > I just did a second round of tests (I don''t know what happen on the first > round :@). > > Results... > > IE: Doesn''t have the problem at all. Can you confirm? > > FF: Only has the problem when the autocomplete="off" attribute isspecified.> Can you confirm? > > > Daniel Elmore > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff > Wilks > Sent: Tuesday, May 23, 2006 9:43 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Autocompleter - up arrow moves cursor to > startofinput box > > Thanks for the quick response. > > > Go into any input box and press the up key, your cursor will move > backwards, > > its part of the basic nav. system. > > I tried pressing the up arrow in the Google.com search box, my > Ameritrade quote box, and on a RoR Trac ticket page. None of them move > the cursor backwards on key-up. (I tested in IE 6, Firefox 1.5, and IE > 7b2). Can you provide an example of a web page that does that? > > Or are you saying, "If and only if you attach to Event.KEY_UP, the > input field will start responding on its own as well." Something > doesn''t seem right about that... I''ll keep looking through the > autocompleter code to see if I can dig something up, but I''d > appreciate any further ideas or commentary. > > > On 5/23/06, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Go into any input box and press the up key, your cursor will move > backwards, > > its part of the basic nav. system. > > > > You can counter this effect in IE by changing the value of the input > field, > > say by: > > > > Field.value = Field.value + ''''; > > > > Tag that to your onkeyup event. > > > > As for FF, I haven''t found any solution. Let me know if you find one. > > > > > > -Daniel Elmore > > > > > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeoff > > Wilks > > Sent: Tuesday, May 23, 2006 9:15 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails-spinoffs] Autocompleter - up arrow moves cursor to start > > ofinput box > > > > When using the autocompleter and scrolling through options, if you > > press the up arrow key the input field cursor moves backward. Some of > > my users have reported that they find this very distracting. Does > > anyone know why this happens, or where in the code I could fix it? > > > > Steps to recreate: > > 1. Go to http://demo.script.aculo.us/ajax/autocompleter > > 2. Type in a letter (or two or three) > > 3. Arrow down through a few of the choices > > 4. Now arrow up, and observe: the text input field cursor movesbackward.> > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs