Commit Graph

154 Commits

Author SHA1 Message Date
jzaefferer
38cfcfffe9 Menu: Update autocomplete to use deactivate and check for focus class 2011-02-24 12:05:20 +01:00
Scott González
50958718c2 Autocomplete: Added support for contenteditable elements. Fixes #6914 - Autocomplete: Support contenteditable. 2011-02-24 10:24:32 +01:00
Scott González
678ff6326a Added version property to plugins that were missing them. 2011-02-03 12:01:26 -05:00
Scott González
a1ab9678e9 Autocomplete: Fixed handling of race conditions when using jQuery 1.3.2. Fixes #6904 - Autocomplete: Race condition handling means. 2011-01-27 14:49:59 -05:00
Scott González
29bfb86ce2 All: Define defaultElement for non-div widgets. 2011-01-23 17:55:53 -05:00
Scott González
6e0482a9cb Updated copyright year. 2011-01-17 09:13:18 -05:00
Scott González
e0b52831fc Updated widgets to use new methods from $.Widget. 2011-01-15 06:34:07 -05:00
Scott González
56c4c6aca9 Change destroy to _destroy and remove calls to $.Widget.prototype.destroy in widgets with simple destroy methods. 2011-01-14 17:11:22 -05:00
jzaefferer
3552947c19 Merge remote branch 'origin/menu'
Conflicts:
	demos/autocomplete/categories.html
	demos/autocomplete/combobox.html
	demos/autocomplete/custom-data.html
	demos/autocomplete/default.html
	demos/autocomplete/folding.html
	demos/autocomplete/multiple-remote.html
	demos/autocomplete/multiple.html
	demos/autocomplete/remote-jsonp.html
	demos/autocomplete/remote-with-cache.html
	demos/autocomplete/remote.html
	demos/autocomplete/xml.html
	demos/button/splitbutton.html
	demos/index.html
	tests/visual/menu/nested.html
	themes/base/jquery.ui.autocomplete.css
	ui/jquery.ui.autocomplete.js
2010-12-22 18:31:27 +01:00
Scott González
08422d69da Autocomplete: Track pending requests and only remove the loading class when the last request completes. Fixes #6761 - Autocomplete: Loading class removed when multiple Ajax requests occur. 2010-12-17 11:15:17 -05:00
Scott González
0d0c86210c Autocomplete: Abort pending ajax requests when disabled and prevent handling results when disabled. Fixes #6752 - Menu may still render when autocomplete is disabled. 2010-12-17 10:48:17 -05:00
Scott González
ca0ac5a64f All: Remove workaround for .offset() setter bug from older versions of jQuery. 2010-12-11 15:19:25 -05:00
Scott González
9681b1fd7e All: Replaced all uses of $.ui.contains() with $.contains(). Fixes #5000 - Deprecate $.ui.contains. 2010-12-10 15:13:10 -05:00
Scott González
eac910f315 Autocomplete: Update selectedItem in the asynchronous focus handling for IE. Fixes #6709 - Autocomplete: Null ui.item on change event in IE8. 2010-12-01 11:51:16 -05:00
Scott González
40135bb091 Autocomplete: Handle ajax errors and timeouts. Fixes #6692 - Autocomplete: ui-autocomplete-loading class not removed when Ajax request times out. 2010-11-30 22:19:20 -05:00
Scott González
f85b998f44 Autocomplete: Re-position menu after resizing, not before. Fixes #6648 - Autocomplete menu position issue when positioned to the right. 2010-11-12 08:41:36 -05:00
Scott González
f4d8ec9159 Autocomplete: Trigger close after hiding the menu. Fixes #6227 - Autocomplete: Don't trigger close event until after the menu is hidden. 2010-10-26 09:05:38 -04:00
Scott González
5c67ed26e8 Autocomplete: Always reset this.term after a select event, even if the select is cancelled. Fixes #6221 - Autocomplete: Doesn't reset after Select when textbox cleared, if same letters typed in rapidly; source function not triggered in that case. 2010-10-25 10:01:43 -04:00
Scott González
a0c856467d Autocomplete: Split menu resizing logic into its own method to create a more logical method to proxy for custom sizing. 2010-10-21 22:15:13 -04:00
Scott González
450d0306dd Autocomplete: Don't react to key events on readonly inputs. Fixes #6170 - autocomplete pops up on readOnly inputs. 2010-10-11 17:23:50 -04:00
Scott González
da13ea26fe Autocomplete: Pass along some more original events. 2010-10-11 08:51:54 -04:00
Dmitry Petrov
c3b282fceb Autocomplete: Prevent keypress events caused by enter key when selecting an item. Fixes #6055 - Autocomplete: Selecting an item by pressing enter submits the form in Opera. 2010-10-06 10:24:03 -04:00
Scott González
a5c119558b Autocomplete: Make sure we have a response before trying to check the length. Fixes #6147 - Autocomplete: Errors on empty responses. 2010-10-05 11:09:39 -04:00
Scott González
adcafce7a2 Autocomplete: Only prevent the default action for enter when a menu item is active. Fixes #6038 - Autocomplete: Allow default behaviour on enter when menu is open but inactive.
Thanks Ján Suchal.
2010-09-27 10:10:00 -04:00
Scott González
dda7bcb638 Autocomplete (Menu): Only traverse through .ui-menu-item elements for paging. Fixes #6029 - Autocomplete: Custom item can be activated (and result in error) on PageUp/PageDown key click. 2010-09-27 09:10:18 -04:00
Scott González
0ccc78698b Autocomplete: Handle IE firing focus events asynchronously. Fixes #6109 - Autocomplete Change event does not fire in IE. 2010-09-24 16:49:10 -04:00
Scott González
d380099116 Autocomplete: Properly handle non-item clicks inside the suggestion list. Fixes #6052 - Autocomplete suggestion list does not close properly. 2010-09-20 09:27:32 -04:00
jzaefferer
dea2f8a7fc Autocomplete: Store term when selecting an item to prevent another search triggered before blur. Fixes #5591 - Home and End keys trigger search 2010-08-31 14:20:56 +02:00
Scott González
da2be6a2af Autocomplete: Abort existing ajax requests when running new searches. 2010-08-24 21:41:34 -04:00
Scott González
f115b48d2b Autocomplete: Don't handle remote data if it's not the most recent request. Fixes #5982 - Autocomplete: Race condition causes incorrect suggestions. 2010-08-24 09:14:44 -04:00
Robson Braga Araujo
3af1f6c1ce Autocomplete: changed menu activated function to check if the offset is greater than or equal the height. Fixed #5923 - autocomplete: Scrolling with the keyboard sometimes does not show the item (Chrome) 2010-08-11 08:21:09 +08:00
Robson Braga Araujo
9a4eecdf85 Autocomplete: changed the search function to always store the last term that was entered by the user. Fixed #5922 - autocomplete: Search not triggered if the first letter is the same as the first letter of a previous erased content 2010-08-11 08:21:08 +08:00
Scott González
de266a1275 Autocomplete: Handle clicks outside the autocomplete after scrolling the results (which causes the body to gain focus). Fixes #5903 - Autocomplete doesn't close after scrolling. 2010-08-05 08:51:54 -04:00
Scott González
ed07f0a056 Autocomplete: Don't reset text field value on blur unless it will actually change the value. Fixes #5900 - Autocomplete: mousing over menu option replaces text box contents, moves caret. 2010-08-04 13:26:42 -04:00
Scott González
90caa93a9b Autocomplete: Respect the disabled option. Fixes #5619 - Autocomplete widget keeps looking for remote data even when it's disabled. 2010-07-30 12:59:33 -04:00
Scott González
58ae7ce2fd Revert "Use pushStack in widget method. Fixes #5732 - make the widget method maintain the stack"
This reverts commit ea58cd5ac0.
2010-07-30 12:38:18 -04:00
jzaefferer
ea58cd5ac0 Use pushStack in widget method. Fixes #5732 - make the widget method maintain the stack 2010-07-30 14:26:58 +02:00
Scott González
4deb824699 Core: Added .outerWidth(), .outerHeight(), .innerWidth(), .innerHeight(). Fixes #5850 - .outerWidth(), .outerHeight(), .innerWidth(), .innerHeight() setters. 2010-07-21 22:17:52 -04:00
Scott González
4c55071976 Autocomplete: Fixed bad reference to ownerDocument. 2010-07-21 14:56:15 -04:00
Scott González
74e0d4f473 Autocomplete: Added appendTo option. Fixes #5836 - Autocomplete: add appendTo option. 2010-07-21 14:54:20 -04:00
Scott González
e85615fc6b Autocomplete: Prevent the default behavior of pressing enter when the menu is open, even if no item is active. Partial fix for #5757 - Autocomplete combobox issues. 2010-07-20 15:13:54 -04:00
Scott González
c2c09e8953 Autocomplete: Clear selectedItem property whenever the user types something. Also updated combobox to clear the select element when clearing the text element. Fixes #5453 - Autocomplete: combobox demo doesn't remove invalid values. 2010-07-20 13:24:53 -04:00
Scott González
e4273ff621 Autocomplet: refactored handling of menu's selected event. 2010-07-20 12:10:58 -04:00
Scott González
2ed96cb0b8 Autocompelte: Only run a search if the value has changed; switching from a blacklist of keys to ignore. Fixes #5716 - autocomplete triggered when field copied with ctrl-c. 2010-07-20 11:48:53 -04:00
Scott González
1f2cfb942f Autocomplete: Render items as text, not HTML. Fixes #5275 - suggestions are not html-encoded.
As noted in the ticket, it's probably better to default to unstyled items to prevent problems. Users can still implement their own rendering method as shown in the custom data and display demo.
2010-07-19 15:45:30 -04:00
Scott González
53489b502d Autocomplete: Don't update the value of the text field until after setting focus. Fixes #5639 - Cursor jumps to beginning on select. 2010-07-19 14:36:40 -04:00
Scott González
5311fe22f3 Menu: Only look for .ui-menu-item elements to determine if a menu item is the first or last element in the menu. Fixes #5528 - Autocomplete: Issue when try to navigate using up key by keyboard in IE6. 2010-07-19 11:51:05 -04:00
Scott González
612838a151 Autocomplete: Added position option. Fixes #5153 - Autocomplete position option. 2010-07-19 09:28:04 -04:00
Scott González
325a262b14 Autocomplete: Use .outerWidth() for determining the size of the menu. Fixes #5832 - Autocomplete: menu has incorrect width. 2010-07-16 14:12:06 -04:00
Scott González
8a5d4ca321 All: Added http://jqueryui.com/about to header comments. 2010-07-14 15:45:45 -04:00
Scott González
21aad10e6a All: Define a local undefined variable inside the main closure. 2010-07-13 09:57:58 -04:00
Scott González
536ae6189b Updated copyright headers to make it clear that you can choose between MIT and GPLv2. Also added a link to http://jquery.org/license. 2010-07-09 09:01:04 -04:00
jzaefferer
0bbbe5f5b1 Autocomplete: Updated escapeRegex utility based on http://xregexp.com/xregexp.js 2010-07-05 10:06:16 +02:00
jzaefferer
fc093e9feb Prevent autocomplete-menu from closing when clicking 'slowly', eg. a long mousedown. Fix for #5405 - Autocomplete: select event not triggered when mousedown duration > blur timeout 2010-05-18 14:57:02 +02:00
jzaefferer
adf19a1849 Renamed menu event selected to select to be consistent with naming conventions, already updated spec on wiki 2010-04-30 13:18:34 +02:00
jzaefferer
abfdb2a8b6 First attempt at integrating key handling into menu 2010-04-30 13:04:09 +02:00
jzaefferer
f0d1262d47 Actually removed the menu code from the autocomplete file 2010-04-30 10:19:36 +02:00
Scott González
cb7eb69973 Autocomplete: Ignore command (left and right/menu/windows), insert, caps lock, home, end keys.
Fixes #5415 - Catch all common keys while typing a word.
2010-04-23 13:00:54 -04:00
jzaefferer
17f8079bc2 Menu: Extracted menu code from autocomplete, updated all dependencies 2010-04-21 21:01:08 +02:00
jzaefferer
dbc9addfae Autocomplete: Refactored code for array filtering into $.ui.autocomplete.filter, used by remote-with-cache and modified multiple-demo (now with local data); added multiple-remote to also show multiple with remote data 2010-04-16 11:05:35 +02:00
jzaefferer
c01b3baef9 Autocomplete: Track input changes and fire change-event on blur, along with selected item, if available. Fix for #5490 2010-04-08 12:05:52 +02:00
jzaefferer
6d9caf1e23 Autocomplete: Only remove classes actually added by the widget, ui-widget etc. aren't added, so don't remove them 2010-03-26 12:42:03 -04:00
jzaefferer
40e3637117 Added $.ui.keyCode.ALT to complete list of metakeys, used in autocomplete 2010-03-26 12:40:46 -04:00
Scott González
f2873b6ebf Menu: Ignore clicks that don't occur on the anchor tag within a valid menu item.
Fixes #5376 - Menu plugin fires select when border is clicked.
2010-03-24 07:15:30 -07:00
Scott González
1ddd4f5d3f Menu: pass the original event to the select callback.
Fixes #5343 - Add option to allow form submission when option is chosen.
2010-03-20 16:17:56 -04:00
Scott González
c61bd8ec67 Menu: Don't trigger select if a click occurs outside of a menu item.
Fixes #5376 - Menu plugin fires select when border is clicked.
2010-03-20 15:09:46 -04:00
Scott González
e70743cdcb Autocomplete: Don't trigger a search when the left or right arrow keys are used.
Fixes #5289 - Autocomplete: ignore cursor left/right.
2010-03-20 14:58:38 -04:00
Scott González
22ba931c39 Menu: skip over elements that aren't menu items.
Fixes #5188 - Refactor menu rendering for more customizing.
2010-03-20 14:37:25 -04:00
Jörn Zaefferer
65d8fa2b0c autocomplete: pass through mouse and key events to menu methods in order to differentiate between key and mouse events in autocomplete 2010-03-20 14:57:06 +00:00
Richard Worth
f2438fe7eb fixed #5368 - Autocomplete: aria role for menu should be listbox instead of menu 2010-03-17 23:22:02 +00:00
Scott González
03adce34dd Menu: Don't pass empty values to ._trigger(). 2010-03-16 00:26:06 +00:00
Richard Worth
d2272f86bc Autocomplete: fixed #5349 - Autocomplete: mouseover of menu item causes data loss 2010-03-15 21:24:42 +00:00
Richard Worth
2be46581da Autocomplete: fixed #5349 - Autocomplete: mouseover of menu item causes data loss 2010-03-15 21:11:21 +00:00
Richard Worth
e6c30b0d97 Autocomplete: Fixed #5348 - Autocomplete: menu item should not remain selected when mouse off menu 2010-03-15 20:57:02 +00:00
Richard Worth
9aa56386a3 Autocomplete: fixed #5347 - Autocomplete: each successive item hover makes item above shrink a bit in IE 2010-03-15 20:40:20 +00:00
Richard Worth
a48466b194 Autocomplete: quiet jslint 2010-03-11 22:06:29 +00:00
Scott González
c2ed8ffc07 Autocomplete: Resize menu on every suggestion. 2010-03-11 04:37:21 +00:00
Scott González
5f213572d6 Autocomplete: Append menu to body and reset z-index on every suggestion.
Fixes #5271.
2010-03-11 03:28:00 +00:00
Richard Worth
caa1786c61 Fixed #5305 - Autocomplete: open event should trigger after the menu is opened since the name is not 'beforeopen' 2010-03-08 16:35:24 +00:00
Scott González
602576707e Autocomplete: search against label instead of value when both are provided.
Fixes #5237 - Array matching behaviour of autocomplete should match on label before value.

Thanks Simon Cusack.
2010-02-27 19:57:34 +00:00
Scott González
aa8f6c5fc1 Autocomplete: Fixed class removal in .destroy(). 2010-02-23 02:59:05 +00:00
Scott González
b26336f2d2 Autocomplete: Reposition menu every time it opens.
Fixes #5217 - Autocomplete in Dialog is posiitoned incorrectly in 1.8 RC2.
2010-02-23 02:57:33 +00:00
Scott González
8185ba0207 Autocomplete: Added a "ui-autocomplete-input" class to the text field.
Fixes #5198 - Autocomplete: class needed on input element.
2010-02-20 01:38:30 +00:00
Scott González
0292c347bb Autocomplete: Deactivate menu on close.
Fixes #5205 - Autocomplete: blur causes last active menu item to be selected.
2010-02-20 01:32:55 +00:00
Scott González
071dc670b7 Autocomplete: Fixed bug with bgiframe usage.
Fixes #5196 - Autocomplete: "menu is not defined" error when using with bgiframe.

Thanks Demphest
2010-02-18 01:23:45 +00:00
Jörn Zaefferer
8c1f4da31a Another partial fix for #5188 - add ui-menu-item class only to list items with anchor-children 2010-02-16 16:34:06 +00:00
Jörn Zaefferer
4f4715017d Fix for #5188 along with a half-functional demo (buggy keyboard navigation) 2010-02-16 16:20:05 +00:00
Scott González
0f3def0d84 Fixed missing variable in menu's refresh method. 2010-02-12 21:17:00 +00:00
Jörn Zaefferer
84f7c90fc8 Autocomplete: Fix for #5154 - cleanup 2010-02-10 15:09:19 +00:00
Jörn Zaefferer
4cea3290a1 Autocomplete: Fix for #5154 2010-02-10 15:08:27 +00:00
Jörn Zaefferer
3875cd33b7 Autocomplete: Fix for #5154 2010-02-10 15:05:35 +00:00
Scott González
925bf9ec35 Autocomplete: Split out logic for rendering individual items. 2010-02-08 01:31:10 +00:00
Scott González
1402650134 Autocomplete: Fixed a few places that got missed during the change to always keep the menu element around.
Fixes a bug where opening the menu using the arrow keys would cycle through the options, but not show the menu. There's now a bug where you have to arrow too many times to get into the menu when showing the menu by using the arrow keys.
2010-02-08 01:17:04 +00:00
Jörn Zaefferer
7321aa017d cleaning up dependency listings 2010-02-03 23:30:37 +00:00
Jörn Zaefferer
30578eb028 create-html-elements convention 2010-02-02 14:22:04 +00:00
Jörn Zaefferer
df391a998f Fix for #5120 - create menu only once and return that element from the widget method, put ui-autocomplete class on menu 2010-02-02 14:04:50 +00:00
Scott González
a4daa10f53 Autocomplete: Turned off collision detection.
Fixes #5114 - Autocomplete: Turn off collision detection for menu.
2010-01-30 16:38:51 +00:00
Scott González
c802347799 Autocomplete: Removed CSS framework classes from text field. We can add them back in when we have full support for form elements. 2010-01-28 04:25:30 +00:00
Richard Worth
074153407d Happy New Year 2010-01-20 14:04:26 +00:00
Scott González
b3e5f8453c Autocomplete: conform to coding standards. 2010-01-17 18:51:11 +00:00