[dw-free] Selecting a username before pressing the user-tag button in the RTE causes a JS error
[commit: http://hg.dwscoalition.org/dw-free/rev/32c4e549d7a2]
http://bugs.dwscoalition.org/show_bug.cgi?id=2225
Fix broken 'select username and turn into link' behavior in RTE.
Patch by
afuna.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2225
Fix broken 'select username and turn into link' behavior in RTE.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js
-------------------------------------------------------------------------------- diff -r 07180fbb157d -r 32c4e549d7a2 htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js --- a/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js Sun Dec 13 10:04:06 2009 +0000 +++ b/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js Sun Dec 13 10:06:54 2009 +0000 @@ -11,6 +11,7 @@ LJUserCommand.Execute=function() { LJUserCommand.Execute=function() { var username; var selection = ''; + var UserTagCache = window.parent.UserTagCache; if (FCK.EditorWindow.getSelection) { selection = FCK.EditorWindow.getSelection(); @@ -91,7 +92,6 @@ LJUserCommand.Execute=function() { do_insert( username ); } else { var DOM = window.parent.DOM; - var UserTagCache = window.parent.UserTagCache; var _textDiv = window.parent._textDiv; var userPopup = new window.parent.LJ_IPPU( window.parent.FCKLang.UserPrompt ); userPopup.hide = function() { --------------------------------------------------------------------------------