Hello  Alex,

I had a similar problem with my custom autocompleter. So to workaround a
solution, I leveraged the mouseenter and mouseleave events over the
suggestion box to detach/re-attach blur handler over search_input.

Something like:

search_input.observe('focus', showSuggestionBox);
search_input.observe('blur',   hideSuggestionBox);

suggestion_box.observe('mouseenter', function()
{search_input.stopObserving('blur', hideSugggestionBox)});
suggestion_box.observe('mouseleave', function()
{search_input.observe('blur', hideSugggestionBox)});

HTH

--
mona

On Mon, Oct 12, 2009 at 11:34 AM, Alex McAuley <
webmas...@thecarmarketplace.com> wrote:

>
> I couldnt find a reasonable solution so i just went with somehting else
> !!...
>
> I will continue to look for one though !
>
> Thanks
>
> Alex Mcauley
> http://www.thevacancymarket.com
> ----- Original Message -----
> From: "david" <david.brill...@gmail.com>
> To: "Prototype & script.aculo.us" <
> prototype-scriptaculous@googlegroups.com>
> Sent: Monday, October 12, 2009 10:28 AM
> Subject: [Proto-Scripty] Re: Focus and Blur in IE / Webkit
>
>
> >
> > Hi Alex,
> > I perhaps did not understand what is your trouble, but interrest in
> > the solution you achieve, and perhaps some idea could come ...
> >
> > --
> > david
> >
> > On 9 oct, 13:46, "Alex McAuley" <webmas...@thecarmarketplace.com>
> > wrote:
> >> I suppose what i am asking for is a prototype cross browser way of
> >> detecting
> >> what element was clicked when a blur event occurs ...
> >>
> >> Alex Mcauleyhttp://www.thevacancymarket.com
> >>
> >> ----- Original Message -----
> >> From: "Alex McAuley" <webmas...@thecarmarketplace.com>
> >> To: <prototype-scriptaculous@googlegroups.com>
> >> Sent: Friday, October 09, 2009 12:44 PM
> >> Subject: [Proto-Scripty] Re: Focus and Blur in IE / Webkit
> >>
> >> > I think i have a way to do it but it involves watching the whole
> >> > document
> >> > for a click which i didnt really want to do.
> >>
> >> > Alex Mcauley
> >> >http://www.thevacancymarket.com
> >>
> >> > ----- Original Message -----
> >> > From: "david" <david.brill...@gmail.com>
> >> > To: "Prototype & script.aculo.us"
> >> > <prototype-scriptaculous@googlegroups.com>
> >> > Sent: Friday, October 09, 2009 12:33 PM
> >> > Subject: [Proto-Scripty] Re: Focus and Blur in IE / Webkit
> >>
> >> >> alex,
> >>
> >> >> I was saying a mix of both evens.
> >> >> For functionnality that work, just use focus/blur, and for the one
> >> >> that don't work, help it with mouseover / out ?
> >>
> >> >> Or I peerhaps miss something?
> >> >> A live example ??
> >>
> >> >> --
> >> >> david
> >>
> >> >> On 9 oct, 13:21, "Alex McAuley" <webmas...@thecarmarketplace.com>
> >> >> wrote:
> >> >>> Hi David.
> >>
> >> >>> It promotes the same problem though .. If i listen for
> >> >>> mouseover/mouseout
> >> >>> on
> >> >>> the element once the mouse goes out of it then it will hide the
> >> >>> results
> >> >>> element anyway!..
> >>
> >> >>> Alex Mcauleyhttp://www.thevacancymarket.com
> >>
> >> >>> ----- Original Message -----
> >> >>> From: "david" <david.brill...@gmail.com>
> >> >>> To: "Prototype & script.aculo.us"
> >> >>> <prototype-scriptaculous@googlegroups.com>
> >> >>> Sent: Friday, October 09, 2009 12:18 PM
> >> >>> Subject: [Proto-Scripty] Re: Focus and Blur in IE / Webkit
> >>
> >> >>> > Hi alex,
> >>
> >> >>> > If I have understand, you could mix the focus/blur with a
> >> >>> > mouseover/
> >> >>> > mouseout even, because when you receive focus, and scroll, you are
> >> >>> > during a mouseover, and when not over, northing has to be done.
> >> >>> > Or somethink like that ?
> >>
> >> >>> > Does it gives you idea ?
> >>
> >> >>> > --
> >> >>> > david
> >>
> >> >>> > On 9 oct, 12:58, Alex Mcauley <webmas...@thecarmarketplace.com>
> >> >>> > wrote:
> >> >>> >> Morning people.
> >>
> >> >>> >> Got a slight issue with IE and focus / blur.
> >>
> >> >>> >> I have a suggestive searchbox that observes keyup and does its
> >> >>> >> thing... This all works fine.
> >>
> >> >>> >> There is a height with overflow:auto on it to allow users to
> >> >>> >> scroll
> >> >>> >> through multiple results to find the correct result and be able
> to
> >> >>> >> select it.
> >>
> >> >>> >> I have just added a(n) observer for focus / blur of the input
> >> >>> >> element
> >> >>> >> that hides the results element on blur and shows them on re-focus
> >> >>> >> of
> >> >>> >> the element.
> >>
> >> >>> >> This all works fine in firefox but does not work in webkit/IE..
> It
> >> >>> >> works as much as blurring and focusing does hide the element but
> >> >>> >> if i
> >> >>> >> try to scroll down the "Results" element it sees the focus is
> lost
> >> >>> >> and
> >> >>> >> hides it!..
> >>
> >> >>> >> What i am trying to replicate is to see what is being focussed /
> >> >>> >> pressed when this is occuring and if its the "Results" element
> >> >>> >> then
> >> >>> >> to
> >> >>> >> not show or hide the "Results" element.
> >>
> >> >>> >> Hope i explained that well and i am sure someone has come across
> >> >>> >> this
> >> >>> >> before.
> >>
> >> >>> >> All relevant help appreciated
> >>
> >> >>> >> Alex
> > >
> >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to