Opened 4 years ago

Closed 4 years ago

#12941 closed Bug (expired)

insertElement(stringToInsert) sometines enter into wrong position or older position

Reported by: Satish Kumar Trivedi Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

We are using ckeditor(ckeditor_4.4.6_full) to create template for report.

In ckEditor we can type as well as insert values from ListBox by double clicking on the value of list box. We have done code as below:-

<asp:ListBox ID="lstComp" runat="server" AutoPostBack="false" ondblclick="CKEDITOR.instances['ctl00_cphContian_editor1'].insertText(this.value);" Height="360"></asp:ListBox>

It works fine but sometimes it does not insert value of listbox on correct cursor position. Either it insert on previous cursor position or on any other location of editor.

Can you please guide on this?

Change History (7)

comment:1 Changed 4 years ago by Jakub Ś

Status: newpending
Version: 4.4.6

I'm not sure what is HTML representation of asp:ListBox. I suspect it is <option... <select.... Standard event for select lists is onchange and not double-click. To be honest I haven't been able to reproduce this problem with native option select and dblckick event (doesn't work). The onchange event on the other hand works as expected.

There might some problem with selection loss. Have you tried focusing editor before inserting text ondblclick="CKEDITOR.instances['ctl00_cphContian_editor1'].focus();CKEDITOR.instances['ctl00_cphContian_editor1'].insertText(this.value);"?
Another thing that you might try is changing event to onchange.

comment:2 Changed 4 years ago by Satish Kumar Trivedi

Thanks for giving quick response. I tried by the options provided by you. But unfortunately it does not resolve the problem.

I am easily able to reproduce the issue. This issue occurred when you change location of cursor using 'mouse' and insert the value from list on onchange or ondblclick event.

For this you need to change the location as said and enter the value from listbox. Repeat the action. This issue occurred maximum time (Not always) when your cursor is at start point of 'p' element.

comment:3 Changed 4 years ago by Jakub Ś

Please tell me in which browser does it happen.

Please provide reduced sample HTML page (if it is possible to reproduce it in raw HTML file) that shows this problem in code. I'm talking about something that can be put in samples folder and will show this issue.

comment:4 Changed 4 years ago by Satish Kumar Trivedi

We are using IE11

comment:5 Changed 4 years ago by Satish Kumar Trivedi

We open this page (which contain CKEditor Control) as pop up page.

comment:6 Changed 4 years ago by Jakub Ś

We are using IE11

I am easily able to reproduce the issue.

on onchange or ondblclick event.

This issue occurred maximum time (Not always) when your cursor is at start point of 'p' element.

I have tried your steps in default IE11 with raw HTML select tag and onchange event assigned. It works as expected. This starts to make me think that this is implementation issue and not CKEditor bug.
Have you made any custom changes to CKEditor core code or you use some third party-plugins for CKEditor? Does IE have any non-standard settings (e.g. Compatibility mode, Quirks mode) or some third-party plugins that might influence this behaviour?

We open this page (which contain CKEditor Control) as pop up page.

This information brings me nowhere close to reproduce this issue. As written in one of previous comments, please try to provide HTML file that allows reproducing this problem in code with standalone CKEditor freshly downloaded from our page.
If it is impossible to reproduce this problem in standalone CKEditor then I would suspect this is implementation issue. You can however provide reduced (very small – focusing on the problem only) and working application which can be run from server and show this problem.

Version 0, edited 4 years ago by Jakub Ś (next)

comment:7 Changed 4 years ago by Piotrek Koszuliński

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy