Phenomenon
When pressing Tab in a list item in Chrome, a tab character is inserted instead of indenting the list item to create a nested list structure. This makes it difficult to create nested lists.
Reproduction example
- Create a list:
<ul><li>Item 1</li><li>Item 2</li></ul> - Place cursor in “Item 2”
- Press Tab
Observed behavior
- Tab character is inserted into the list item
- List item is not indented
- Nested list structure is not created
- User cannot easily create nested lists
Expected behavior
- Tab should indent list item (create nested list)
- Shift+Tab should unindent
- Nested list structure should be created
- Behavior should match word processors
Browser Comparison
- All browsers: Tab inserts character (default behavior)
- Custom handling needed for list indentation
Notes and possible direction for workarounds
- Intercept Tab key in list items
- Prevent default behavior
- Create nested list structure
- Move list item to nested list
- Handle Shift+Tab for unindenting