Opened 18 years ago
Closed 18 years ago
#250 closed Task (fixed)
ignoreSpaceTextOnly ignored?
Reported by: | Guillaume Outters | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Summary: ignoreSpaceTextOnly seems to be ignored in GetPreviousSourceElement and GetNextSourceElement
Analysis:
if ( ignoreSpaceTextOnly && currentNode.nodeType == 3 && currentNode.nodeValue.RTrim().length > 0 ) break ; […] return null ;
So, when hitting some text with ignoreSpaceTextOnly, Get…SourceElement will return null. Shouldn't it return currentNode instead of break (that is, when ignoreSpaceTextOnly == true, do not ignore what is not SpaceTextOnly)?
Problem: This function is only called in backspace/delete handling, and it doesn't harm there (it returns no previoussourceelement, so the event gets passed to the browser, which handles the key correctly). On the other hand, making the behaviour match what the parameter's name suggests breaks a lot of things.
Solution: Rename the variable to something significant?
You are right... some commenting would be good there :)
I've just added it with [216].