discourse/app/assets/javascripts/pretty-text/addon
Keegan George eb987460f2
FEATURE: Select emojis in picker via keyboard (#18163)
* DEV: Make emoji elements focusable

Since emoji elements are of type `<img>` it requires a `tablindex="0"` in order to be focusable.

* WIP: Handle emoji focus/selection via arrow keys

Near completion, however, need a few fixes/improvements and overall code cleanup

* WIP: Testing

* DEV: Fixes and cleanup

* DEV: Follow conventions

* DEV: Improve up/down traversal when recents present

* DEV: Emoji markup in tests should include `tabindex`

* DEV: Add `tabindex` to topic tests

* DEV: Variable name as `searchInput` instead of `searchBar`

* DEV: Use appropriate method name (`_setNumEmojiPerRow`)

* DEV: Add comments and avoid nested if

* WIP: Adding test

* Fix first test

* DEV: Add assertions for arrow keys and escape key

* Some fixes for up/down navigation

This does not fix everything, when going from one section to another,
there are issues

* Fix a small regression

* FIX: Ability to focus on search results

Fixes regression

* Refactor calculating next up/down emoji

* Debugging test failure

* Skip stubborn CI test, add others

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2022-09-21 13:21:36 -07:00
..
emoji FEATURE: Add missing emojis (#15582) 2022-01-14 17:51:13 -03:00
engines DEV: Update linting setup and fix issues (#17345) 2022-07-06 10:37:54 +02:00
allow-lister.js FEATURE: Allow iframe allow attribute in posts (#17291) 2022-07-05 12:25:27 -03:00
censored-words.js DEV: Ensure censorFn copes with null regexpList (#17754) 2022-08-02 11:09:51 +01:00
emoji.js FEATURE: Select emojis in picker via keyboard (#18163) 2022-09-21 13:21:36 -07:00
guid.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
inline-oneboxer.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
oneboxer-cache.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
oneboxer.js DEV: Introduce discourseLater (#17532) 2022-07-17 00:50:49 +02:00
pretty-text.js DEV: Add force_quote_link option to PrettyText (#16034) 2022-02-23 16:13:46 +10:00
sanitizer.js DEV: Extensively use includes() (#17541) 2022-07-17 20:48:36 +02:00
upload-short-url.js DEV: Extensively use includes() (#17541) 2022-07-17 20:48:36 +02:00