[wp-trac] [WordPress Trac] #58416: Media Title field should soft wrap in Media Modal: For better readability/editing of long titles.

WordPress Trac noreply at wordpress.org
Wed Jun 7 12:36:16 UTC 2023


#58416: Media Title field should soft wrap in Media Modal: For better
readability/editing of long titles.
-------------------------------------------------+-------------------------
 Reporter:  abitofmind                           |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Media                                |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-screenshots has-       |     Focuses:
  testing-info needs-testing needs-unit-tests    |  administration
-------------------------------------------------+-------------------------

Comment (by mrinal013):

 Hello @abitofmind ,

 Thanks for your hint. I will push ASAP.

 However, I try to add the following code in src/wp-includes/media-
 editor.js, but can't find out a way to build it on my end. So, I will give
 a time to implement the script.

 {{{
 // Prevent Enter in title textarea
 $(document.body)
     .on( 'keypress', '#attachment-details-two-column-title', function(
 event ) {
         if ( event.key == 'Enter' ) {
             return false;
         }
 });
 }}}
 This script will prevent `Enter` keyboard event. For that, the
 `meta_value` for the attachment in the database is similar to the
 `textarea` field. Will it solve the issue?

 As the screenshot of the `alt text` field, this is also doing irregular
 behavior.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58416#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list