Focus lost after pressing "enter" to select item from drop-down box #5574

Closed
opened 2025-12-29 19:29:39 +01:00 by adam · 3 comments
Owner

Originally created by @bluikko on GitHub (Oct 28, 2021).

NetBox version

v3.0.8

Python version

3.8

Steps to Reproduce

  1. Edit some item, for example create a new Device.
  2. Move the focus to an input item that is a drop-down box, for example the "Role" field, or more crucially "Tags" or "Tagged VLAN" that accepts multiple drop-down box items.
  3. Type a few letters or choose directly some item from the drop-down box with keyboard, pressing the enter key.
  4. Focus is "lost" somewhere - it seems to be on the current input field, but further input to the field is not accepted.
    This makes entering multiple items to fields that accept them difficult.

This is on Win10, Chrome latest version.

Expected Behavior

After pressing the enter key to choose an item from a drop-down box the focus should stay on the current input field and pressing letters on the keyboard should invoke filtering the drop-down box items again.

Observed Behavior

After selecting a drop-down box item with the enter key, no further input to the field is accepted. Pressing letters on the keyboard do nothing.

User needs to switch focus between items (for example tab key followed by shift-tab) to get the keyboard to enter more input to the drop-down box.

Originally created by @bluikko on GitHub (Oct 28, 2021). ### NetBox version v3.0.8 ### Python version 3.8 ### Steps to Reproduce 1. Edit some item, for example create a new Device. 2. Move the focus to an input item that is a drop-down box, for example the "Role" field, or more crucially "Tags" or "Tagged VLAN" that accepts multiple drop-down box items. 3. Type a few letters or choose directly some item from the drop-down box with keyboard, pressing the enter key. 4. Focus is "lost" somewhere - it seems to be on the current input field, but further input to the field is not accepted. This makes entering multiple items to fields that accept them difficult. This is on Win10, Chrome latest version. ### Expected Behavior After pressing the enter key to choose an item from a drop-down box the focus should stay on the current input field and pressing letters on the keyboard should invoke filtering the drop-down box items again. ### Observed Behavior After selecting a drop-down box item with the enter key, no further input to the field is accepted. Pressing letters on the keyboard do nothing. User needs to switch focus between items (for example tab key followed by shift-tab) to get the keyboard to enter more input to the drop-down box.
adam added the type: bugstatus: needs ownerpending closure labels 2025-12-29 19:29:39 +01:00
adam closed this issue 2025-12-29 19:29:39 +01:00
Author
Owner

@bluikko commented on GitHub (Dec 7, 2021):

Now in 3.0.11 drop-down boxes seem to have a more bug-like behavior sometimes:

  1. Move focus to a drop-down box.
  2. Press letters on keyboard to filter the list to say 1 item only.
  3. Press down arrow to select the filtered item.
  4. It seems like the item should be selected but it isn't: the selected item flashes but nothing happens and focus is returned to entering the filter.
  5. Repeat 3 + 4 and the item is finally selected.

This can be seen in at least VM interface editing:

  1. Edit a VM interface.
  2. Change 802.1Q Mode to Tagged.
  3. Change 802.1Q Mode to Access.
  4. Click Untagged VLAN.
  5. Type VLAN ID to filter the list, say 999.
  6. The list is filtered to VLAN ID 999, so press down key to select the item.
  7. The selected VLAN 999 flashes but is not selected, focus returns to entering a filter.
  8. Press down key again and the VLAN can now be selected.

It does not seem to be 100% repeatable. Sometimes a less convoluted sequence causes the step where pressing down key makes the item just flash but not get selected.

This is on Chrome/Windows 10, some extensions are loaded but nothing that should affect NetBox. I'll try to make a better/more repeatable test case and test the latest version since sometimes I'm hitting it all the time.
Seems to happen the 1st time after a page loads with dropdown boxes.

@bluikko commented on GitHub (Dec 7, 2021): Now in 3.0.11 drop-down boxes seem to have a more bug-like behavior sometimes: 1. Move focus to a drop-down box. 2. Press letters on keyboard to filter the list to say 1 item only. 3. Press down arrow to select the filtered item. 4. It seems like the item should be selected but it isn't: the selected item flashes but nothing happens and focus is returned to entering the filter. 5. Repeat 3 + 4 and the item is finally selected. This can be seen in at least VM interface editing: 1. Edit a VM interface. 2. Change 802.1Q Mode to Tagged. 3. Change 802.1Q Mode to Access. 4. Click Untagged VLAN. 5. Type VLAN ID to filter the list, say 999. 6. The list is filtered to VLAN ID 999, so press down key to select the item. 7. The selected VLAN 999 flashes but is not selected, focus returns to entering a filter. 8. Press down key again and the VLAN can now be selected. It does not seem to be 100% repeatable. Sometimes a less convoluted sequence causes the step where pressing down key makes the item just flash but not get selected. This is on Chrome/Windows 10, some extensions are loaded but nothing that should affect NetBox. I'll try to make a better/more repeatable test case and test the latest version since sometimes I'm hitting it all the time. Seems to happen the 1st time after a page loads with dropdown boxes.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 6, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Feb 6, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Mar 8, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Mar 8, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5574