Ask questions and get good answers on mb.jQuery.components

Hi,

All of the sudden when I select a form field in a contact form, the extruder page closes, not giving me a chance to fill out the form.

Seems to work fine in Firefox and IE9.

It just started happening, it always worked perfedtly in Chrome. I'm assuming it was some sort of Chrome update.

Any ideas? Thanks.

asked Feb 12 '11 at 14:04

jeffm2008's gravatar image

jeffm2008
111

closed Apr 06 '11 at 16:09

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

The question has been closed for the following reason "The question is answered, right answer was accepted" by Matteo Bicocchi Apr 06 '11 at 16:09


Seams that FORMS elements in Chrome now have different box model and in this case fire the mouseleave event of the parent element. Anyway you can solve this bug changing few lines of code in mbExtruder.js; around line 160:

c.bind("mouseleave", function(e){
  if(extruder.get(0).options.closeOnExternalClick){
    if(!$(e.target).parents().is(".text"))
      $(document).one("click.extruder"+extruder.get(0).idx,function(){extruder.closeMbExtruder();});
  }
  closeTimer=setTimeout(function(){

    if(extruder.get(0).options.autoCloseTime > 0){
      extruder.closeMbExtruder();
    }
  },extruder.get(0).options.autoCloseTime);
}).bind("mouseenter", function(){
  clearTimeout(closeTimer);
  $(document).unbind("click.extruder"+extruder.get(0).idx);
});

1) Pass the event to the "mouseleave" listener function -> c.bind("mouseleave", function(e){...

2) add this conditional for the "extruderClose" activation: if(!$(e.target).parents().is(".text")) as shown above.

This controll verify if the clicked element is inside the container or not before activate the "onclick" listener to the DOCUMENT.

You can download the latest GitHub update with this bugfix: https://github.com/pupunzi/jquery.mb.extruder/zipball/master

Hope this can help you.

Bye, Matteo

answered Feb 12 '11 at 15:38

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

edited Feb 12 '11 at 15:47

jQuery main site - Matteo Bicocchi