#114 new
spotlight2001

autocomplete - div scrollbar closes suggest list

Reported by spotlight2001 | November 7th, 2008 @ 02:14 PM

If you have a autocomplete list with a scrollbar. Then try to scroll down - as soon as you click the scrollbar - the DIV list goes away.

my pity workaround:

controls.js


var Autocompleter = { }
Autocompleter.Base = Class.create({


  onBlur: function(event) {
	//if click on scrollbar of DIV
	//it gets closed
	//we try to estimate whether it was clicked
	//let go if x offset > 310
	//or let go if y offset < 0
	if (event.offsetX > 310) {
		//good may close
	} else if (event.offsetY < 0) {
		//good - may close
	} else {
		//prevent autocomplete close
		event.cancelBubble;
		event.srcElement.focus();
		return false;
	}

    // needed to make click events working
    setTimeout(this.hide.bind(this), 250);
    this.hasFocus = false;
    this.active = false;
  },

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

script.aculo.us is an open-source JavaScript framework for visual effects and interface behaviours.

Source available from github
The Git repository resides at:
http://github.com/madrobby/scriptaculous

Check out the current development trunk with:
git clone git://github.com/madrobby/scriptaculous.git

As script.aculo.us 1.xx is feature-frozen, this development trunk is for bugfixes only.

New development should happen only for
script.aculo.us 2.

Creating a bug report
When creating a bug report, be sure to include as much relevant information as possible. Post a an example that shows off the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.

People watching this ticket

Pages