Dotclear

Changeset 3744:6abafffe0db8


Ignore:
Timestamp:
03/30/18 07:12:59 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Remove required attribute from comment/post content textarea when they are not more focusable (dcLegacyEditor)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcLegacyEditor/js/_post_editor.js

    r3709 r3744  
    5252  } 
    5353 
     54  $('#comments').onetabload(function() { 
     55    // Remove required attribut from #comment_content as textarea might be not more focusable 
     56    if (dotclear.legacy_editor_tags_context[dotclear.legacy_editor_context].indexOf('#comment_content') !== -1) { 
     57      $('#comment_content').removeAttr('required'); 
     58    } 
     59  }); 
     60 
    5461  $('#edit-entry').onetabload(function() { 
    5562 
    5663    // Remove required attribut from #post_content in XHTML mode as textarea is not more focusable 
    5764    if (formatField.value == 'xhtml') { 
    58       $('#post_content').removeAttr('required'); 
     65      if (dotclear.legacy_editor_tags_context[dotclear.legacy_editor_context].indexOf('#post_content') !== -1) { 
     66        $('#post_content').removeAttr('required'); 
     67      } 
    5968    } 
    6069 
Note: See TracChangeset for help on using the changeset viewer.

Sites map