[ 7 posts ]

Mona Patel

  • Username: mona_patel
  • Joined: Mon Nov 14, 2011 1:22 pm
  • Posts: 16
  • GitHub: Mona
  • Gists: Mona
  • IRC: Mona
  • Offline
  • Profile

Autocomplete Listbox vanishes with scrollbar

Post Posted: Wed Feb 15, 2012 9:57 am
+0-
Hi Everyone,

I have problem of autocomplete List with scrollbar.

I have given height and width to container with overflow property. Now if container height is greater then define height then scrollbar is coming becuase of overflow property. But when i try to scroll down using scrollbar then autocomplete list is vanishes becuase now focus is removed from the input box.

This is again roadblock for my application, So please anyone can suggest me asap.

Alberto Santini

YUI Contributor

  • Offline
  • Profile

Re: Autocomplete Listbox vanishes with scrollbar

Post Posted: Wed Feb 15, 2012 10:36 am
+0-
Hello Mona.

The attribute "scrollIntoView: true" should do the job.

Otherwise I misunderstood the issue and it would be better to provide a snippet reproducing the case.

Hope that helps,
IceBox

P.S.: See also viewtopic.php?f=92&t=9318&p=30099

Mona Patel

  • Username: mona_patel
  • Joined: Mon Nov 14, 2011 1:22 pm
  • Posts: 16
  • GitHub: Mona
  • Gists: Mona
  • IRC: Mona
  • Offline
  • Profile

Re: Autocomplete Listbox vanishes with scrollbar

Post Posted: Wed Feb 15, 2012 10:44 am
+0-
Hello Alberto,

You misunderstood the issue.
When i drag scroll bar and drop it at that time my autocomplete list is vanishes becuase now the focus is on scrollbar.

Ryan Grove

YUI Developer

  • Username: rgrove
  • Joined: Tue Dec 09, 2008 9:55 pm
  • Posts: 275
  • Location: Portland, OR
  • Twitter: yaypie
  • GitHub: rgrove
  • Gists: rgrove
  • IRC: rgrove
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Autocomplete Listbox vanishes with scrollbar

Post Posted: Wed Feb 15, 2012 11:06 am
+0-
Mona, what browser and OS are you using?

I'm looking into this and finding that in most browsers, clicking and dragging the scrollbar works fine, but the list disappears if you release the click when the mouse is outside the list area. Is this the same thing you're seeing?

Mona Patel

  • Username: mona_patel
  • Joined: Mon Nov 14, 2011 1:22 pm
  • Posts: 16
  • GitHub: Mona
  • Gists: Mona
  • IRC: Mona
  • Offline
  • Profile

Re: Autocomplete Listbox vanishes with scrollbar

Post Posted: Wed Feb 15, 2012 12:13 pm
+0-
Yes, the same one list disappears after scrolling.

Machine XP
and Browser : IE8

Ryan Grove

YUI Developer

  • Username: rgrove
  • Joined: Tue Dec 09, 2008 9:55 pm
  • Posts: 275
  • Location: Portland, OR
  • Twitter: yaypie
  • GitHub: rgrove
  • Gists: rgrove
  • IRC: rgrove
  • YUI Developer
  • Offline
  • Profile

Re: Autocomplete Listbox vanishes with scrollbar

Post Posted: Wed Feb 15, 2012 12:24 pm
+0-
Should be fixed by this commit, which will go into YUI 3.5.0: https://github.com/rgrove/yui3/commit/f ... a88119cea6

In the meantime, you can add the following code to your page after you load the AutoComplete module but before you create an AutoComplete instance, and it should fix the issue:

aclist-scroll-fix.js

Click here to see the revision history on this Gist.

Mona Patel

  • Username: mona_patel
  • Joined: Mon Nov 14, 2011 1:22 pm
  • Posts: 16
  • GitHub: Mona
  • Gists: Mona
  • IRC: Mona
  • Offline
  • Profile

Re: Autocomplete Listbox vanishes with scrollbar

Post Posted: Wed Feb 15, 2012 12:37 pm
+0-
Thanks Ryan !!!!
  [ 7 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
cron