Changeset 1718 for FCKeditor/trunk


Ignore:
Timestamp:
03/18/2008 10:09:43 AM (7 years ago)
Author:
fredck
Message:

Fixed #2016 : The Link dialog now properly select the first field when opening it to modify mailto or anchor links. This problem was also throwing an error in IE.

Location:
FCKeditor/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/_whatsnew.html

    r1717 r1718  
    8585                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2011">#2011</a>] Internal
    8686                        CSS &lt;style&gt; tags where being outputted when FullPage=true.</li>
     87                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2016">#2016</a>] The Link
     88                        dialog now properly select the first field when opening it to modify mailto or anchor
     89                        links. This problem was also throwing an error in IE.</li>
    8790        </ul>
    8891        <h3>
  • FCKeditor/trunk/editor/dialog/common/fck_dialog_common.js

    r1629 r1718  
    105105        var element = GetE( elementId ) ;
    106106        element.focus() ;
    107         element.select() ;
     107
     108        // element.select may not be available for some fields (like <select>).
     109        if ( element.select )
     110                element.select() ;
    108111}
    109112
  • FCKeditor/trunk/editor/dialog/fck_link/fck_link.js

    r1565 r1718  
    160160        // Activate the "OK" button.
    161161        dialog.SetOkButton( true ) ;
    162         SelectField( 'txtUrl' ) ;
     162       
     163        // Select the first field.
     164        switch( GetE('cmbLinkType').value )
     165        {
     166                case 'url' :
     167                        SelectField( 'txtURL' ) ;
     168                        break ;
     169                case 'email' :
     170                        SelectField( 'txtEMailAddress' ) ;
     171                        break ;
     172                case 'anchor' :
     173                        if ( GetE('divSelAnchor').style.display != 'none' )
     174                                SelectField( 'cmbAnchorName' ) ;
     175                        else
     176                                SelectField( 'cmbLinkType' ) ;
     177        }
    163178}
    164179
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy