-
Notifications
You must be signed in to change notification settings - Fork 55
HTML tooltip on form fields #2145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: releases/25.2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /* | ||
| * Copyright (c) 2010, 2025 BSI Business Systems Integration AG | ||
| * Copyright (c) 2010, 2026 BSI Business Systems Integration AG | ||
| * | ||
| * This program and the accompanying materials are made | ||
| * available under the terms of the Eclipse Public License 2.0 | ||
|
|
@@ -55,6 +55,7 @@ export class FormField extends Widget implements FormFieldModel { | |
| /** If set to true, {@link saveNeeded} will return true as well, even if the value has not been changed. */ | ||
| touched: boolean; | ||
| tooltipText: string; | ||
| tooltipHtmlEnabled: boolean; | ||
| font: string; | ||
| foregroundColor: string; | ||
| backgroundColor: string; | ||
|
|
@@ -121,6 +122,7 @@ export class FormField extends Widget implements FormFieldModel { | |
| this.suppressStatus = null; | ||
| this.touched = false; | ||
| this.tooltipText = null; | ||
| this.tooltipHtmlEnabled = false; | ||
| this.tooltipAnchor = FormField.TooltipAnchor.DEFAULT; | ||
| this.onFieldTooltipOptionsCreator = null; | ||
| this.validationResultProvider = this._createValidationResultProvider(); | ||
|
|
@@ -486,6 +488,16 @@ export class FormField extends Widget implements FormFieldModel { | |
| this._updateTooltip(); | ||
| } | ||
|
|
||
| /** @see FormFieldModel.tooltipText */ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The JS doc should link tooltipHtmlEnabled not tooltipText |
||
| setTooltipHtmlEnabled(tooltipHtmlEnabled: boolean) { | ||
| this.setProperty('tooltipHtmlEnabled', tooltipHtmlEnabled); | ||
| } | ||
|
|
||
| /** @internal */ | ||
| _renderTooltipHtmlEnabled() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use protected instead and remove the internal JS doc because it is not used from outside of the class. |
||
| this._updateTooltip(); | ||
| } | ||
|
|
||
| /** @see FormFieldModel.tooltipAnchor */ | ||
| setTooltipAnchor(tooltipAnchor: FormFieldTooltipAnchor) { | ||
| this.setProperty('tooltipAnchor', tooltipAnchor); | ||
|
|
@@ -1155,7 +1167,8 @@ export class FormField extends Widget implements FormFieldModel { | |
| parent: this, | ||
| position: this.statusPosition, | ||
| // This will be done by _updateFieldStatus again, but doing it here prevents unnecessary layout invalidations later on | ||
| visible: this._computeStatusVisible() | ||
| visible: this._computeStatusVisible(), | ||
| tooltipHtmlEnabled: this.tooltipHtmlEnabled | ||
| }); | ||
| this.fieldStatus.render(); | ||
| this.$status = this.fieldStatus.$container; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also call the setter after line 196 so it can be changed while the tooltip is open.