Skip to content

Commit

Permalink
fix: Do not let client update the value when editor is readonly or di…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
TatuLund committed Jan 9, 2024
1 parent 978ea55 commit ad24a86
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/vaadin/tinymce/TinyMce.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ void runBeforeClientResponse(SerializableConsumer<UI> command) {

@ClientCallable
private void updateValue(String htmlString) {
this.currentValue = htmlString;
setModelValue(htmlString, true);
if (this.isEnabled() && !this.isReadOnly()) {
this.currentValue = htmlString;
setModelValue(htmlString, true);
}
}

public String getCurrentValue() {
Expand Down

0 comments on commit ad24a86

Please sign in to comment.