Ticket #5553 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

Cursor location in Paste from Word and Paste dialogs is incorrect for BIDI languages

Reported by: satya Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.3
Component: UI : Language Version: 3.0
Keywords: IBM Confirmed Review+ Cc: damo,joek

Description

To reproduce the defect:

  1. Open http://nightly.ckeditor.com/5388/_samples/ui_languages.html
  1. Select Arabic or Hebrew in the languages drop don list
  1. Click on Paste from Word or Paste Icons in the Toolbar

Expected Result: Paste from Word or Paste dialog is opened and the Cursor is on the right-side of the text area

Actual Result: Paste from Word or Paste dialog is opened and the Cursor is on the left-side of the text area.

The Cursor Position is shown properly in Paste as Plain Text dialog.

Attachments

5553.patch (902 bytes) - added by garry.yao 4 years ago.
5553_2.patch (1.2 KB) - added by garry.yao 4 years ago.
5553_3.patch (1.3 KB) - added by garry.yao 4 years ago.
5554_4.patch (610 bytes) - added by alfonsoml 4 years ago.

Change History

Changed 4 years ago by garry.yao

comment:1 Changed 4 years ago by garry.yao

  • Keywords Confirmed Review? added
  • Status changed from new to assigned
  • Version changed from 3.2 to 3.0
  • Owner set to garry.yao

comment:2 Changed 4 years ago by fredck

  • Keywords Review- added; Review? removed
  • Component changed from General to UI : Language

Considering that the pasting area is there to receive contents to be inputted in the editor, I think the contentsLangDirection setting should be used instead. In that case, the "lang" attribute cannot be used as we don't have such information.

comment:3 Changed 4 years ago by fredck

#5485 is introducing the contentLanguage setting which could be then used for the "lang" attribute.

comment:4 Changed 4 years ago by garry.yao

Matches my first thought on this, but does that means we should reflect the same thing to Paste Text dialog?

Changed 4 years ago by garry.yao

comment:5 Changed 4 years ago by garry.yao

  • Keywords Review? added; Review- removed

comment:6 Changed 4 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:7 Changed 4 years ago by garry.yao

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [5451].

comment:8 Changed 4 years ago by satya

  • Status changed from closed to reopened
  • Resolution fixed deleted

This is still not fixed..Cursor is still showing on the left hand side of Text Area in Paste and Paste from Word dialogs.

comment:9 Changed 4 years ago by garry.yao

  • Status changed from reopened to closed
  • Resolution set to fixed

Now the paste area behaves just like editing document, explicit definition of 'contentsLangDirection' is required if you're using a ltr UI language.

comment:10 Changed 4 years ago by satya

  • Status changed from closed to reopened
  • Resolution fixed deleted

There is still an inconsistency here. The textarea in the Paste Text dialog is taking the language direction from the UI, it should now use the contentsLangDirection instead.

Changed 4 years ago by garry.yao

comment:11 Changed 4 years ago by garry.yao

  • Keywords Review? added; Review+ removed

Align the 'Paste Text' area direction.

comment:12 Changed 4 years ago by fredck

  • Keywords Review+ added; Review? removed

The documentation changes may not be needed though, as the pasting area is in fact related to the contents, so it simply inherits its direction (it may happen in other parts of the editor, even if not documented).

comment:13 Changed 4 years ago by garry.yao

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed with [5466].

comment:14 Changed 4 years ago by damo

  • Status changed from closed to reopened
  • Resolution fixed deleted

This still doesn't seem to work for Paste as Plain Text. I can see that the following code is in the dialog:

'dir=' + editor.config.contentsLangDirection + ';' +

but the output HTML does not use the 'dir' property?

Changed 4 years ago by alfonsoml

comment:15 Changed 4 years ago by alfonsoml

  • Keywords Review? added; Review+ removed

The patch used the "dir=" attribute instead of the css "direction:"

comment:16 Changed 4 years ago by garry.yao

  • Keywords Review+ added; Review? removed

comment:17 Changed 4 years ago by alfonsoml

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed with [5507]

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