Skip to main content

Search and Top Navigation

#7634 closed bug (duplicate)

Opened August 13, 2011 02:44AM UTC

Closed August 13, 2011 03:18AM UTC

Solution for ticket #5933 and #6730

Reported by: marship Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.autocomplete Version: 1.8.15
Keywords: Cc:
Blocked by: Blocking:
Description

Hi. I found same issue with Chinese input. I reviewed your post in ticket #5933 and #6730. You're focus in keydown and keypress event which is unreliable.

I am proposing my solution to keep track of focus and blur to test value change. It works well in firefox for Chinese.

the solution is when get focus , keep a interval timer.

this.input.focus(function(){

this.key_sim = setInterval(function(){

if(self.input.val().length > 0 && self.input.data('lastValue') != self.input.val())

{

self.input.data('lastValue', self.input.val());

self.input.autocomplete( "search" ,self.input.val());

}

}, 200);

});

And when blur, clear the interval.

this.input.blur(function(e) {

clearInterval(this.key_sim);

});

It works fine. so please consider this.

Regards.

Scott

Attachments (0)
Change History (1)

Changed August 13, 2011 03:18AM UTC by scottgonzalez comment:1

_comment0: Using an interval was already suggested, but we have yet to see a good path for this. Feel free to send a pull request against one of the previous tickets.1313205535958752
component: ui.coreui.autocomplete
resolution: → duplicate
status: newclosed

Using an interval was already suggested, but we have yet to see a good patch for this. Feel free to send a pull request against one of the previous tickets.