Ticket #2528134 (closed enhancement)
Reporter Jenny Donnelly |
Opened: 07/2/09 Last modified: 12/23/10 Status: closed Type: enhancement Resolution: wontfix |
Owner Jenny Donnelly |
Target Release: FUTURE Priority: P5 (trivial) |
|---|---|---|---|
| Summary: | Support query values pasted in with mouse | ||
| Description: | Values pasted in with mouse (i.e., right-click > paste) don't trigger key events therefore don't trigger queries. Will consider adding a config to enable interval detection to support this case. |
||
| Type: | enhancement | Observed in Version: | 2.7.0 |
| Component: | AutoComplete | Severity: | S4 (low) |
| Assigned To: | Jenny Donnelly | Target Release: | FUTURE |
| Location: | Library Code | Priority: | P5 (trivial) |
| Tags: | Relates To: | ||
| Browsers: | N/A | ||
| URL: | |||
| Test Information: | |||
Walter Rumsby
We've extended the YUI control distributed in YUI 2.6.0 and added paste support by adding the following event listener:
Event.on(input, 'paste', function(e, autocomplete) {// We're interested in the value of the input field after text is pasted into it instead of the pasted text because the autocomplete
// proposals are based upon the field's whole value. The paste event happens before the input field has been updated so we need to wait until
// after this event has been handled to check the value of the input field.
window.setTimeout(function() {
if (autocomplete._sInitInputValue !== autocomplete.getInputEl().value) {
autocomplete.sendQuery(autocomplete.getInputEl().value);
}
}, 1);
}, this);