Opened 17 years ago
Closed 17 years ago
#2254 closed Bug (fixed)
Malfunction in FCKSelection object
Reported by: | Evgeny Satanovsky | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6.2 |
Component: | General | Version: | FCKeditor 2.5 |
Keywords: | Confirmed Review+ | Cc: |
Description
FCKSelection have 2 methods called: HasAncestorNode and MoveToAncestorNode. Both of theme have input parameter called nodeTagName of type string and as written in comments of this function the passed string should be written in upper case.
But in the code when check is done actual tag name never converted to upper case.
if ( oContainer.tagName == nodeTagName ) return true ;
So if your edited HTML has tags written in lower case (like custom tags) this functions won't find the ancestor tag.
Hope you'll fix this small thing in next revision.
tank's
Attachments (3)
Change History (15)
comment:1 Changed 17 years ago by
Keywords: | Confirmed added; FCKSelecte upper case tagName HasAncestorNode MoveToAncestorNode removed |
---|
comment:2 Changed 17 years ago by
Milestone: | → FCKeditor 2.6.1 |
---|---|
Owner: | set to Wojciech Olchawa |
Changed 17 years ago by
Attachment: | 2254.patch added |
---|
comment:3 Changed 17 years ago by
Keywords: | Review? added |
---|
comment:4 Changed 17 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Owner: | changed from Wojciech Olchawa to Martin Kou |
Status: | new → assigned |
Changed 17 years ago by
Attachment: | 2254_2.patch added |
---|
comment:5 Changed 17 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:6 Changed 17 years ago by
Keywords: | Review+ added; Review? removed |
---|---|
Summary: | Malfunction in FCK.Selecte object → Malfunction in FCKSelection object |
BTW, I think that sometimes Safari does return node names with a different case than the rest of the browsers. Am I right?
Do you think that this can fix any other problem?
comment:7 Changed 17 years ago by
Hmm... no? Safari gives out upper case nodeNames for HTML nodes, just the same as any other browser at the moment.
comment:8 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [2046].
Click here for more info about our SVN system.
comment:9 Changed 17 years ago by
Keywords: | Review- added; Review+ removed |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Changed 17 years ago by
Attachment: | 2254_3.patch added |
---|
comment:10 Changed 17 years ago by
Keywords: | Review? added; Review- removed |
---|
Ok, tagName is not always defined for all DOM nodes, particularly for the #document node.
Changing to checking for nodeName instead.
comment:11 Changed 17 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:12 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixed with [2072].
Click here for more info about our SVN system.
Hmm... the patch has a number of problems:
We actually have a shorthand string function defined in FCKeditor's code for this kind of case insensitive string matching - String::IEquals(). You can find it in $FCKeditor/editor/_source/fckjscoreextensions.js, it's a very useful function. :)