mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-08 13:46:16 +02:00
revert changes to field
This commit is contained in:
parent
5454c2bfbe
commit
cfb2f719fb
@ -60,6 +60,8 @@ interface IProps {
|
||||
// If specified, contents will appear as a tooltip on the element and
|
||||
// validation feedback tooltips will be suppressed.
|
||||
tooltipContent?: JSX.Element | string;
|
||||
// If specified the tooltip will be shown regardless of feedback
|
||||
forceTooltipVisible?: boolean;
|
||||
// If specified, the tooltip with be aligned accorindly with the field, defaults to Right.
|
||||
tooltipAlignment?: ComponentProps<typeof Tooltip>["placement"];
|
||||
// If specified alongside tooltipContent, the class name to apply to the
|
||||
@ -271,6 +273,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
||||
validateOnChange,
|
||||
validateOnFocus,
|
||||
usePlaceholderAsHint,
|
||||
forceTooltipVisible,
|
||||
tooltipAlignment,
|
||||
...inputProps
|
||||
} = this.props;
|
||||
@ -279,7 +282,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
||||
const tooltipProps: Pick<React.ComponentProps<typeof Tooltip>, "aria-live" | "aria-atomic"> = {};
|
||||
let tooltipOpen = false;
|
||||
if (tooltipContent || this.state.feedback) {
|
||||
tooltipOpen = this.state.feedbackVisible;
|
||||
tooltipOpen = (this.state.focused && forceTooltipVisible) || this.state.feedbackVisible;
|
||||
|
||||
if (!tooltipContent) {
|
||||
tooltipProps["aria-atomic"] = "true";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user