File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,12 @@ export class PageEditor extends Component {
7575
7676 // Changelog controls
7777 const updateChangelogDebounced = debounce ( this . updateChangelogDisplay . bind ( this ) , 300 , false ) ;
78- this . changelogInput . addEventListener ( 'input' , updateChangelogDebounced ) ;
78+ this . changelogInput . addEventListener ( 'input' , ( ) => {
79+ const count = this . changelogInput . value . length ;
80+ const counterEl = document . getElementById ( 'changelog-count' ) ;
81+ if ( counterEl ) counterEl . innerText = `${ count } / 250` ;
82+ updateChangelogDebounced ( ) ;
83+ } ) ;
7984
8085 // Draft Controls
8186 onSelect ( this . saveDraftButton , this . saveDraft . bind ( this ) ) ;
Original file line number Diff line number Diff line change @@ -106,11 +106,15 @@ class="dropdown-container">
106106 <ul refs =" dropdown@menu" class =" wide dropdown-menu" >
107107 <li class =" px-l py-m" >
108108 <p class =" text-muted pb-s" >{{ trans (' entities.pages_edit_enter_changelog_desc' ) } } </p >
109- <input refs =" page-editor@changelogInput"
110- name =" summary"
111- id =" summary-input"
112- type =" text"
113- placeholder =" {{ trans (' entities.pages_edit_enter_changelog' ) } }" />
109+ <textarea
110+ refs =" page-editor@changelogInput"
111+ name =" summary"
112+ id =" summary-input"
113+ rows =" 2"
114+ maxlength =" 250"
115+ placeholder =" {{ trans (' entities.pages_edit_enter_changelog' ) } }"
116+ ></textarea >
117+ <small class =" text-muted mt-xs" id =" changelog-count" >0 / 250</small >
114118 </li >
115119 </ul >
116120 <span >{{-- Prevents button jumping on menu show --}} </span >
You can’t perform that action at this time.
0 commit comments