Make WordPress Core

Changeset 36703


Ignore:
Timestamp:
02/25/2016 03:47:46 AM (11 years ago)
Author:
azaozz
Message:

TinyMCE, inline link dialog:

  • Reset the inline dialog when canceling the advanced modal. If there is a link it should be on the first stage: follow/preview link.
  • Fix tabbing in the inline edit dialog.

See #33301.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wplink/plugin.js

    r36677 r36703  
    5858                                '<div id="' + this._id + '" class="wp-link-input">' +
    5959                                        '<input type="text" value="" tabindex="-1" placeholder="' + tinymce.translate('Paste URL or type to search') + '" />' +
    60                                         '<input type="hidden" value="" />' +
     60                                        '<input type="text" style="display:none" value="" />' +
    6161                                '</div>'
    6262                        );
    … …  
    446446                        classes: 'widget btn primary'
    447447                } );
     448
     449                return {
     450                        hideEditToolbar: function() {
     451                                editToolbar.hide();
     452                        }
     453                };
    448454        } );
    449455} )( window.tinymce );
  • trunk/src/wp-includes/js/wplink.js

    r36677 r36703  
    209209                                // If this is moved above the selection changes,
    210210                                // IE will show a flashing cursor over the dialog.
    211                                 inputs.url.focus()[0].select();
     211                                window.setTimeout( function() {
     212                                        inputs.url.focus()[0].select();
     213                                }, 100 );
    212214                        }
    213215
    … …  
    243245
    244246                mceRefresh: function( url, text ) {
    245                         var selectedNode = editor.selection.getNode(),
    246                                 linkNode = editor.dom.getParent( selectedNode, 'a[href]' ),
     247                        var linkNode = editor.dom.getParent( editor.selection.getNode(), 'a[href]' ),
    247248                                onlyText = this.hasSelectedText( linkNode );
    248249
    … …  
    273274
    274275                close: function() {
    275                         var linkNode;
    276 
    277276                        $( document.body ).removeClass( 'modal-open' );
    278277
    … …  
    285284                                }
    286285                        } else {
    287                                 linkNode = editor.dom.getParent( editor.selection.getNode(), 'a[href]' );
    288 
    289                                 if ( linkNode && editor.dom.getAttrib( linkNode, 'href' ) === '_wp_link_placeholder' ) {
    290                                         editor.dom.remove( linkNode, true );
    291                                 }
    292 
     286                                editor.plugins.wplink.hideEditToolbar();
    293287                                editor.focus();
    294288                        }
  • trunk/src/wp-includes/version.php

    r36702 r36703  
    1919 * @global string $tinymce_version
    2020 */
    21 $tinymce_version = '4304-20160219';
     21$tinymce_version = '4304-20160224';
    2222
    2323/**
Note: See TracChangeset for help on using the changeset viewer.