Ticket #2016 (closed Bug: fixed)

Opened 2 months ago

Last modified 2 months ago

Error Opening Links Dialog with IE7

Reported by: MarkWB Assigned to: fredck
Priority: Normal Milestone: FCKeditor 2.6
Component: UI : Dialogs Version: SVN
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

2016.patch (2.0 kB) - added by fredck on 03/15/08 16:20:54.

Change History

03/15/08 16:00:49 changed by fredck

  • keywords set to Confirmed HasPatch.

03/15/08 16:20:54 changed by fredck

  • attachment 2016.patch added.

03/15/08 16:22:16 changed by fredck

  • keywords changed from Confirmed HasPatch to Confirmed Review?.
  • owner set to fredck.
  • status changed from new to assigned.

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

03/15/08 17:40:17 changed by alfonsoml

  • keywords changed from Confirmed Review? to Confirmed Review+.

(follow-up: ↓ 7 ) 03/15/08 20:22:00 changed by MarkWB

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.

03/16/08 08:55:57 changed by alfonsoml

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.

03/16/08 19:49:12 changed by MarkWB

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.

(in reply to: ↑ 4 ) 03/18/08 10:10:42 changed by fredck

  • status changed from assigned to closed.
  • resolution set to fixed.

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.