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?

Change History (1)

comment:1 Changed 18 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

You are right... some commenting would be good there :)

I've just added it with [216].

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