Skip to content

BB-854: fix(editor): Enter key submission for Author Credit and right click context menu in entity search fields#1240

Open
atharvsp02 wants to merge 1 commit intometabrainz:masterfrom
atharvsp02:BB-854
Open

BB-854: fix(editor): Enter key submission for Author Credit and right click context menu in entity search fields#1240
atharvsp02 wants to merge 1 commit intometabrainz:masterfrom
atharvsp02:BB-854

Conversation

@atharvsp02
Copy link
Copy Markdown
Contributor

@atharvsp02 atharvsp02 commented Feb 22, 2026

Problem

Ticket: BB-854

In the Author Credit field pressing Enter after selecting an author did not submit the form and Right clicking inside the field did not show the browsers context menu, making it impossible to paste a BBID with a mouse

Solution

  • Removed blurInputOnSelect prop from EntitySearchFieldOption because it removed focus from the field after selecting an author, preventing Enter from submitting the form. The blur() for the BBID paste workflow is unchanged.
  • Added text-field-menu CSS class and flexbox so the <input> element expands to fill the empty area of the field, enabling the browsers right click context menu.

Areas of Impact

  • EntitySearchFieldOption.js - removed blurInputOnSelect, added text-field-menu class
  • style.scss - added scoped CSS under .text-field-menu
  • Fix applies to all entity search dropdowns (Author Credit, Publisher, Relationship, Edition Group, Series, Area etc.) so right-click paste now works across all of them

Screenshots

Before

image

After

image

const entityOption = this.entityToOption(entity);
const newValue = this.props.isMulti ? [...this.props.value, entityOption] : entityOption;
this.props.onChange(newValue);
this.selectRef.current.blur();
Copy link
Copy Markdown
Contributor Author

@atharvsp02 atharvsp02 Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MonkeyDo ,
After a successful BBID paste, this.selectRef.current.blur() removes focus from the field, so Enter key submission will not work at that point. Should this be handled differently?

width: 100% !important;
opacity: 1 !important;
cursor: text !important;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MonkeyDo , I also wanted to ask after this fix the Author Credit field no longer stretches when very long text is typed, it scrolls inside the field instead. Should the original behaviour be preserved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant