[Webkit-unassigned] [Bug 61594] REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 3 19:35:13 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=61594





--- Comment #7 from Ryosuke Niwa <rniwa at webkit.org>  2011-06-03 19:35:13 PST ---
Thanks for working on this bug.  I'm excited to see a progress.

(In reply to comment #5)
> I wasn't sure whether to implement a new splitTreeToPosition method, or modify splitTreeToNode to take either. Please let me know what you think.

We should modify splitTreeToNode to take a Position instead of adding a new function.

> splitTreeToPosition currently doesn't handle splitting nodes if the position is not at the start or end of the node. Currently InsertParagraphSeparatorCommand is the only caller, and it never creates a case like that because it splits text nodes before calling splitTreeTo(Node|Position).

It worries me to no end that we're adding a brand new function for dealing with this very specific case whereas splitTreeToNode is a well-understood function and used in many places.

> The reason that the id is duplicated for the span "wrapper" is that InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock() doesn't avoid duplicating ids, as SplitElementCommand::executeApply() does. Should I file a separate bug/write a separate patch for that?

Yes, please file a separate bug for that.  But maybe we should first merge that function with CompositeEditCommand::cloneParagraphUnderNewElement.  It's really terrible that we have all these functions that do slightly different things all over the place.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list