Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4062 (new enhancement)

Opened 2 years ago

Last modified 2 years ago

[PATCH] autocompleter choices-div: bigger then input field if needed

Reported by: tobias.buschor@relationpage.ch Assigned to: Rails
Priority: normal Milestone:
Component: script.aculo.us Version: 1.0.0
Severity: normal Keywords: autocompleter width
Cc:

Description

I think its better, if the choices-div can be bigger then the input-field. For this, i changed the code in the control.js:

line 57:

this.options.onShow       = this.options.onShow || 
function(element, update){ 
  if(!update.style.position || update.style.position=='absolute') {
    update.style.position = 'absolute';
    Position.clone(element, update, {setHeight: false, setWidth: false, offsetTop: element.offsetHeight});
    if(update.style['minWidth'] == undefined){
        update.style['width'] = element.offsetWidth+'px';
    } else {
        update.style['minWidth'] = element.offsetWidth+'px';
    }
  }
  Effect.Appear(update,{duration:0.15});
};

Change History

03/04/06 13:18:08 changed by anonymous

  • type changed from defect to enhancement.
  • summary changed from autocompleter choices-div: bigger then input field if needed to [PATCH] autocompleter choices-div: bigger then input field if needed.

04/29/06 13:09:59 changed by anonymous

For some reason it doesn't work in IE6. With Firefox, everything OK

05/26/06 10:06:30 changed by Tommy <tommy.skaue@gmail.com>

I hacked this in IE with a rather cute fix: I wrap the content with a table and a td with nowrap. But I agree, it most cases in my app I want to control the width of the result-div