Caret does not work after dragging off of the syntax editor

SyntaxEditor for WPF Forum

Posted 2 years ago by José Miguel Bogajo González
Version: 21.1.3
Platform: .NET 5.0
Environment: Windows 10 (64-bit)
Avatar

Hi,

I have an issue with the caret after dragging off of the syntax editor.

I have a list of draggable objects. To handle the use of this objects in the syntax editor I use the event "PasteDragDrop". This works perfect.

However my issue is when I drag into the syntax editor one of these objects, drag off and drop the object out of the editor. Then, when I click in the syntax editor the caret remains in the last position it was before ending the drag event. If I type anything it seems that internally the caret is set to the correct position but visually the caret blinking stays fixed.

This happens when I upgraded to v2021.1 version to have compatibility with .NET 5.0 since we upgraded it as well. Previously I used v2017.1 version and it worked fine. The code is practically the same excepting the way to access the caret before it was editor.Caret.Position and now it is editor.ActiveView.Selection.CaretPosition.

I think what is happening is that the drag enter event makes it follow the cursor, and the drag leave event is not handled so it still thinks it is in the middle of a drag drop. The walkaround to get back the control of the caret (resetting) is by dragging something else into the syntax editor and drop it in (so the drop handler is hit properly).

Does anyone have a clue of what happens or can reproduce the same issue?

Thanks in advance,

Josemi

Comments (1)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Josemi,

Thank you for reporting this bug. While it was not a known issue, some recent enhancements to drag-and-drop functionality for the next release of SyntaxEditor have already addressed the issue. I can confirm I was able to easily reproduce the issue in prior versions, but cannot reproduce it with newer builds containing the drag-and-drop updates. We do not have an official release date to offer, but you should expect the next release in the coming weeks.


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.