Skip to content

Commit

Permalink
SAK-47748 Commons creating/editing posts inserts default values when …
Browse files Browse the repository at this point in the history
…the content is removed sakaiproject#10905
  • Loading branch information
maurercw authored Oct 18, 2022
1 parent 45e6118 commit efbf34d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commons/tool/src/webapp/WEB-INF/templates/post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="commons-post-content">
<span id="commons-high-priority-{{id}}" class="fa fa-flag commons-high-priority" title={{tr 'priority_icon'}} style="display:none;"></span>
<a id="commons-author-name-{{id}}" class="commons-post-author-name" data-user-id="{{creatorId}}" href="javascript:;">{{creatorDisplayName}}</a>
<span class="commons-post-content" id="commons-post-content-{{id}}">{{{content}}}<span>
<span class="commons-post-content" id="commons-post-content-{{id}}">{{{content}}}</span>
</div>
<div id="commons-post-options-{{id}}" class="commons-post-options">
<span id="commons-like-section" >
Expand Down
2 changes: 1 addition & 1 deletion commons/tool/src/webapp/WEB-INF/templates/posts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="commons-photo-text-wrapper">
<sakai-user-photo user-id="{{currentUserId}}"></sakai-user-photo>
<div class="commons-editor-text-wrapper">
<div class="commons-editor-text"><div id="commons-post-creator-editor" contenteditable="true">{{tr 'post_editor_initial_text'}}</div></div>
<div class="commons-editor-text"><span id="commons-post-creator-editor" contenteditable="true">{{tr 'post_editor_initial_text'}}</span></div>
</div>
</div>
<div id="commons-editor-toolbar" class="act">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,7 @@ span.commons-high-priority {
border: 1px solid black;
overflow: hidden;
}

.commons-post-content[contenteditable="true"]:empty:before {
content: "\feff"; /* ZERO WIDTH NO-BREAK SPACE */
}

0 comments on commit efbf34d

Please sign in to comment.