Opened 16 years ago

Closed 16 years ago

#2016 closed Bug (fixed)

Error Opening Links Dialog with IE7

Reported by: Mark Bryson Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: FCKeditor 2.6
Component: UI : Dialogs Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Review+ Cc:

Description

Error Message: Line: 103 Error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

Cause: Invoking the links dialog for properties of either an existing anchor or 'mailto:' when using IE7.

This dialog can open three different ways based on link type for which it'll be a properties dialog; namely 'url', 'anchor', or 'email'. The error is true for both 'anchor' and 'email' since the element on which focus gets placed is specific for 'url', and so is invisible for the other two cases. Replacing line 162 of 'dialog/fck_link/fck_link.js' that reads like:

	SelectField( 'txtUrl' ) ;

with valid (and sensible) places to put focus based on the three conditions:

	switch( document.getElementById( 'cmbLinkType' ).value )
	{
		case 'url'	: SelectField( 'txtURL' ) ; break ;
		case 'email'	: SelectField( 'txtEMailSubject' ) ; break ;
		case 'anchor'	: document.getElementById( 'cmbAnchorName' ).focus() ;
	}

fixes it for me. (SelectField isn't totally valid for anchor)

FF seems not to care, but IE does. (SVN build 18395)

Attachments (1)

2016.patch (2.0 KB) - added by Frederico Caldeira Knabben 16 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Confirmed HasPatch added

Changed 16 years ago by Frederico Caldeira Knabben

Attachment: 2016.patch added

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review? added; HasPatch removed
Owner: set to Frederico Caldeira Knabben
Status: newassigned

Thanks for the fix proposal MarkWB. The attached patch implements it with some few minor enhancements.

comment:3 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review+ added; Review? removed

comment:4 Changed 16 years ago by Mark Bryson

I don't think there can be any reason for focus to be placed for 'email' here unless it is already an email link for which an address has already been established. Furthermore, if someone wishes to change the email address, it is a rare case (e.g. title attribute has additionally been defined with source) when it can't be done in the editor itself without having to invoke this dialog to begin with. So in most cases for an email link, the first desirable property somebody could wish to edit would be the subject; in which case the address is pre-filled with no desire to change it. These are the reasons I chose the subject field instead of address.

Wow! I wish bugs got fixed this quick where I work! Thanks.

comment:5 Changed 16 years ago by Alfonso Martínez de Lizarrondo

I think that someone editing an email link has the same chances of changing the email address (he did make a mistake, the contact person has changed...) than those of changing the subject line (I would even say that most of the people just want to provide an email contact link, but without a pre-filled subject line)

So placing the focus on that first input sounds fine, he can easily move forward with the tab.

comment:6 Changed 16 years ago by Mark Bryson

I totally agree. However, on wishing to change the address, when would you have to use this dialog? (rare) However on the other hand, I've noticed my point only applies to IE, not FF. (can usually change address in editor without this dialog) So, yea I'd leave it. Thanks again for fixing it.

comment:7 in reply to:  4 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Replying to MarkWB:

Wow! I wish bugs got fixed this quick where I work! Thanks.

It is always nice when the reporter proposes a patch for it... things get much faster out our side. Thanks again MarkWB.

Fixed with [1718]. Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy