Thread-topic: Crashing from undo/redo using "replaceSelectionWithText"
Title: Re: Crashing from undo/redo using "replaceSelectionWithText"That could very well be the problem. I thought I took care of that case, but setting breakpoints shows me that it’s still happening. I’ll give that a try, and if it still doesn’t work, I’ll file the bug.
On 2/12/08 5:48 PM, "Justin Garcia" <email@hidden> wrote:
On Feb 12, 2008, at 4:28 PM, Jing Chen (Volt) wrote:
I’m having a problem with the undo/redo that is implemented in WebKit. When I do something that alters the selected text (like [WebView replaceSelectionWithText] or changing the font of the selected text) inside of the delegate method of NSComboBox, comboBoxSelectionDidChange, the undo/redo behaves incorrectly. For example:
Select “2” and trigger the NSComboBox delegate notification, which is supposed to replace the selection with “foo”. The result is “1fooc”
Undo. This gives “foo123”, should give “123”
Redo. This gives “foo1foo3”, should give “1foo3”
Undo twice. This gives “foo”, should give the empty string (original starting point).
Is it possible that comboBoxSelectionDidChange is being called during any of the editing operations that are performed on the text? For example, perhaps it is called during the Undo operation, which might explain the extraneous "foo" that appears before "123".
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden