Commit Graph

9 Commits

Author SHA1 Message Date
Ryan Oriecuia
573e7e69c9 Autocomplete: Fix IE/Edge scrolling issues
IE11 and scrolling autocompletes didn't get along great; this should help fix
their relationship.

When you click on an autocomplete scrollbar in IE11, the menu temporarily
gains focus, which caused a couple problems.

1. Depending on how long you clicked, the dropdown could close.

2. Scrolling down by clicking the scrollbar's down arrow would misbehave. The
list would pop back up to the top with the first item selected.

We can fix both problems by modifying the focus/blur handling a bit.

1. There is a flag to instruct the control to ignore blurs, but it was getting
cleared too quickly; when the code refocused the input after it was blurred,
IE would send *another* blur event, which wasn't getting ignored and would
close the dropdown. We now wait for the focus/blur pair to process before
clearing the flag.

2. We remove the tabindex from the dropdown menu, which prevents menu's focus
handler from firing. When you focus a menu, it will select the first menu item
if none are selected. Selecting a menu item will scroll it into view if it's
not visible. This combination of behaviors was causing the strange behavior
when attempting to scroll down.

I couldn't figure out a way to write a unit test for this, since it's IE only
and seems to require user interaction. You can verify the previous behavior
(and the fix) on `demos/autocomplete/maxheight.html`

Fixes #9638
Closes gh-1785
2017-01-25 10:57:34 -05:00
Scott González
cbceca7091 Autocomplete: Work around isContentEditable bug in Chrome
Fixes #14917
Closes gh-1673
2016-02-16 12:22:10 -05:00
Jörn Zaefferer
cb69f0025f All: Fix manifest issues for categories and CSS dependencies
Collapses "UI Core" and "Core" into just "Core".

Fixes bad paths for CSS dependencies. Regressed when moving widgets
into the widgets subfolder.
2015-10-23 09:09:51 -04:00
Scott González
548fbf570c Autocomplete: Close the menu on any outside interactions
This ensures that the menu will close if the user interacts with a
draggable, resizable, etc. element since those interactions don't
change focus.

Ref #6642
Closes gh-1614
2015-10-16 14:09:05 -04:00
Scott González
ce50178430 Autocomplete: Use a div instead of a span for the live region
Fixes #14587
2015-09-18 11:19:59 -04:00
Alexander Schmitz
14b3b607e5 Autocomplete: Style updates
Ref #14246
2015-09-11 08:36:40 -04:00
Alexander Schmitz
8029cc94e1 Autocomplete: Style updates
Ref #14246
Ref gh-1588
2015-08-21 08:06:23 -04:00
Alexander Schmitz
8140d0c901 Menu: Move menu into widgets folder
Ref #13885
2015-08-08 00:29:38 -04:00
Alexander Schmitz
4c6b1463ea Autocomplete: Move autocomplete into widgets folder
Ref #13885
2015-08-08 00:29:37 -04:00