Граф коммитов

31 Коммитов

Автор SHA1 Сообщение Дата
Mu-An Chiou 6169911757
Convert to TypeScript 2020-05-20 18:24:33 -04:00
Mu-An Chiou 21348b469c
Rename browser.js to bundle.js
so the purpose is clearer
2020-04-30 12:59:14 -04:00
Mu-An Chiou c68ce3f188
Add back prevent default
This is so that we take full control of this shortcut
On macOS user can style use Up/Arrow without modifier keys
in place of this shortcut
2020-04-29 14:36:24 -04:00
David Graham ca5395c93f
Build native module as main file
Co-authored-by: Mu-An Chiou <me@muanchiou.com>
2020-04-29 11:00:53 -06:00
Mu-An Chiou 87cd268157
Expect default to not be prevented 2020-04-28 15:39:43 -04:00
Mu-An Chiou 3c434192d5
Add optional alt + arrow key support
https://www.w3.org/TR/wai-aria-practices-1.2/#combobox

Alt + Down Arrow (Optional):
  If the popup is available but not displayed,
  displays the popup without moving focus.

Alt + Up Arrow (Optional):
  If the popup is displayed:
    If the popup contains focus, returns focus to the combobox.
    Closes the popup.
2020-04-28 12:25:53 -04:00
Mu-An Chiou 3ba7929e42
Change aria-owns to for 2020-04-28 12:22:26 -04:00
Mu-An Chiou e3cb84d997
Remove dependency on mouseup event 2019-04-29 10:02:31 -04:00
Mu-An Chiou 4dfac8c230
Add test to ensure mousedown/mouseup behavior 2019-04-29 09:58:16 -04:00
Mu-An Chiou 8cb1e3d78c
Ensure tab keydown does not get canceled after commit 2019-04-16 15:07:17 -04:00
Mu-An Chiou 866a17e86a
Fix test - arrow down should not be canceled when no results are shown 2019-04-16 14:38:17 -04:00
David Graham d6381ad378
Add AutocompleteEvent subclass
Allows relatedTarget to be used without null checks and type assertions
on the HTMLInputElement. It's guaranteed to be included in the event.

Co-authored-by: Mu-An Chiou <muan@github.com>
2019-04-12 13:42:41 -06:00
David Graham ea3cf21c9b
Include input as relatedTarget in change event 2019-04-10 16:45:05 -06:00
Mu-An Chiou c7ef68e1a3
Ensure default behavior goes through 2019-03-01 13:45:35 -05:00
Mislav Marohnić e20aa838ff Update for modern browsers
- adopt babel-preset-github (drop IE 11)
- stop transforming custom element classes
- flow strict
2019-02-22 11:23:14 +01:00
Mu-An Chiou 521668d7eb
Upgrade comobobox-nav to ensure click on disabled item is cancelled 2019-01-14 17:39:01 -05:00
Mu-An Chiou 91488ce3bf
Upgrade combobox-nav and fix build 2019-01-07 11:35:33 -05:00
Mu-An Chiou a08610f756
Add test to ensure disabled items don't get committed 2019-01-07 11:29:44 -05:00
Mu-An Chiou 2c9f896c24
Patch aria-owns attribute for backwards compatibility 2019-01-04 17:28:48 -05:00
Mu-An Chiou c27d30d6d7
Replace keyboard binding code with combobox-nav 2019-01-04 17:22:39 -05:00
Mu-An ✌️ Chiou 2b26184ab7
Add test for results hidden state 2018-08-27 13:55:28 -04:00
David Graham 0512dde4a8
Support links as result menu items
Navigate to the link destination rather than committing the link text as
the auto-completed value. This is useful for including actions at the
end of the result list, like "learn more" or "create new item".
2018-08-10 13:29:14 -06:00
Mislav Marohnić e2eb6b5d66 Avoid keyboard shortcuts leading to exceptions for no results 2018-06-28 17:10:16 +02:00
Mislav Marohnić 58a997b71c Speed up the test by reacting to `loadend` 2018-06-28 17:03:20 +02:00
Mislav Marohnić ee621b1521 Simpler setup and teardown of mocha fixture element 2018-06-28 17:03:02 +02:00
David Graham 849b587c1a
Require aria-owns relationship
The aria-owns attribute must be configured correctly for the combo box
relationship between the input and result list to work.
2018-05-16 20:00:54 -06:00
David Graham 2d2f6a2a13
Use first child input element
Simplify the relationship between the combo box parent and its input
field.
2018-05-16 18:07:12 -06:00
David Graham 0c96ef6424
Remove results element
The combo box composite widget is composed of two elements: an input
field and a popup results container.
2018-05-16 18:02:58 -06:00
David Graham e24ae898db
Test server auto-complete requests 2018-04-11 17:01:23 -06:00
David Graham cb7b56d6ac
Lint test files 2018-04-11 14:47:19 -06:00
David Graham ef41de379b
Add start of test suite 2018-04-11 13:55:40 -06:00