diff --git a/src/app/fate-input/fate-input.component.ts b/src/app/fate-input/fate-input.component.ts
index a9b4dc2..1386e57 100644
--- a/src/app/fate-input/fate-input.component.ts
+++ b/src/app/fate-input/fate-input.component.ts
@@ -20,8 +20,9 @@ import { FateLegacyBrowserService } from '../fate-legacy-browser.service';
`,
@@ -37,6 +38,9 @@ import { FateLegacyBrowserService } from '../fate-legacy-browser.service';
color: #000;
overflow: visible;
}
+ :host div.fate-edit-target.disabled {
+ user-select: none;
+ }
:host div.fate-edit-target.empty:not(:focus):before {
content:attr(title);
color: #636c72;
@@ -92,6 +96,7 @@ export class FateInputComponent implements ControlValueAccessor, OnChanges, OnIn
public empty: boolean = true;
protected editTarget: any;
protected isFocused: boolean = false;
+ public isDisabled: boolean = false;
constructor(protected el: ElementRef, protected controller: FateControllerService, protected htmlParser: FateHtmlParserService, protected parser: FateParserService, protected sanitizer: DomSanitizer, protected factoryResolver: ComponentFactoryResolver, protected legacyBrowser: FateLegacyBrowserService) {}
@@ -397,6 +402,10 @@ export class FateInputComponent implements ControlValueAccessor, OnChanges, OnIn
public registerOnTouched(fn: () => void) {}
+ public setDisabledState(isDisabled: boolean): void {
+ this.isDisabled = isDisabled;
+ }
+
protected checkForDropdownContext() {
const startPos = Math.max(this.selectionRange.startOffset - 20, 0);
const length = this.selectionRange.startOffset - startPos;