Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9118 closed bug (fixed)

Autocomplete: Mouse auto-highlights option in Firefox

Reported by: gneier99 Owned by:
Priority: minor Milestone: 1.10.2
Component: ui.autocomplete Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hi Folks,

This is a bug I've seen for months now, finally prompted to report a bug. It can be seen in the demo page (http://jqueryui.com/autocomplete/#custom-data) and is reduced in the jsfiddle.

Problem: suggestion is auto-highlighted when mouse is positioned below <input>.

Browser: modern Firefox (16,17,18,19) OS: PC, MAC

JSFiddle: http://jsfiddle.net/sSPn5/

To reproduce:

  1. click in <input> to gain focus
  2. move mouse a little below <input>
  3. type "j", "q"
  4. note that a selection like "JQuery" is autohighlighted. In other browsers, you have to wiggle the mouse to highlight.
  5. if you click "enter", this selection is copied to the <input> and the form submitted

From playing with the jquery UI code, an internal ui overlay focus event is fired.

Thank you, Gary

Change History (9)

comment:1 Changed 7 years ago by tj.vantoll

Status: newopen
Summary: jQuery Autocomplete - autohighlight in FirefoxAutocomplete: Mouse auto-highlights option in Firefox

Verified this against master http://jsfiddle.net/sSPn5/1/. The behavior does not occur in IE10, Chrome, Safari, or Opera. I find it very interesting that the auto highlighting occurs on the 2nd character typed.

comment:2 Changed 7 years ago by tj.vantoll

comment:3 Changed 7 years ago by gneier99

A partial fix to the same problem was addressed 9 months ago: http://bugs.jqueryui.com/ticket/7024

comment:4 Changed 7 years ago by Scott González

Resolution: fixed
Status: openclosed

Autocomplete: Set isNewMenu flag on every suggestion. Fixes #9118 - Autocomplete: Mouse auto-highlights option in Firefox.

Changeset: d5d3a745b00dd476195cf25b35cc02f3bc31f814

comment:5 Changed 7 years ago by Scott González

Milestone: none1.10.2

comment:6 Changed 7 years ago by Scott González

If you're feeling adventurous, you can go to about:config and create a new boolean preference layout.reflow.synthMouseMove and set it to false. The bug will go away :-)

I'm discussing this with Mozilla devs right now, trying to get a change upstream.

comment:7 Changed 7 years ago by gneier99

Hi Scott,

Thank you for the quick reply. Regarding the isNewMenu flag.. you mean to see it to TRUE permanently? I assume not, as that would cause other problems. The flag currently flips from true to false and back to true when the overly closes. In the jsfiddle, using the latest jQ UI code that has isNewMenu, the auto-highlight still happens. In order to fix this in my (older) version of jQ UI (1.8.23), I had to strip out a bit in menu:focus and start tracking the mouse position. This is working for the time being.

I'll start upgrading to jQ 1.91 and jQ UI 1.10.. and revisit this later

thank you,

-Gary

comment:8 Changed 7 years ago by Scott González

It's not set to true permanently. It's set to true on every new suggestion and set to false after the first mouseover/menufocus event.

comment:9 Changed 7 years ago by gneier99

Thanks Scott,

I see your edit here: https://github.com/jquery/jquery-ui/commit/d5d3a745b00dd476195cf25b35cc02f3bc31f814

You guys are quick. -Gary

Note: See TracTickets for help on using tickets.