Opened 15 years ago

Last modified 15 years ago

#6235 closed Bug

BIDI: Applying direction to multi-paragraph selection within a div — at Version 10

Reported by: Damian Owned by: Tobiasz Cudnik
Priority: Normal Milestone: CKEditor 3.4.2
Component: General Version: 3.4
Keywords: IBM Cc: Joe Kavanagh, Satya, satya_minnekanti@…

Description (last modified by Garry Yao)

When selecting multiple paragraphs that reside inside a <div>, the direction attribute is being set on the parent <div> rather than the paragraphs.

<div>
  <p>Paragraph 1</p>
  <p>Paragraph 2</p>
</div>

The expectation is that the individual paragraphs get their direction attribute set.

Change History (11)

comment:1 Changed 15 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added

comment:2 Changed 15 years ago by Sa'ar Zac Elias

Milestone: CKEditor 3.4.1
Status: newconfirmed

comment:3 Changed 15 years ago by Tobiasz Cudnik

Owner: set to Tobiasz Cudnik
Status: confirmedassigned

comment:4 Changed 15 years ago by Tobiasz Cudnik

Status: assignedpending

This feature interferer with a logic responsible for matching one fully selected element. In this case it's DIV, but after selecting all cells of a table, then it would change direction on table only.

Do you need this feature only for paragraphs ? What about paragraphs inside a table cell ?

comment:5 Changed 15 years ago by Damian

This is a good question.

To help understand the impact, is it possible to get a list of cases where this might apply? One other case I'm guessing that is similar is lists.

comment:6 Changed 15 years ago by Tobiasz Cudnik

This is true for following elements:

  • table
  • ul
  • ol
  • blockquote
  • div

When their children will be selected, direction will be applied to parent element. Ticket responsible for this is #5909.

comment:7 Changed 15 years ago by Satya Minnekanti

Correct steps to reproduce the defect is:

<div>

<p>Paragraph 1</p>

<p>Paragraph 2</p>

<p>Paragraph 3</p>

<p>Paragraph 4</p>

</div>

Create 3 or more paragraphs inside a div and then select any 2 paragraphs and apply RTL direction to them.

Expected Result: RTL Language direction should be applied only to the selected 2 paragraphs.

Actual Result: RTL Language direction is applied to the whole div and RTL Language direction is applied to all the paragraphs.

comment:8 Changed 15 years ago by Garry Yao

Status: pendingconfirmed

satya's provided test should at least be targeted.

comment:9 Changed 15 years ago by Tobiasz Cudnik

Attached patch handles last Satya's TC, although it's a logic in opposite direction that main ticket's TC.

Anyway i would like to have some review on this one too.

Changed 15 years ago by Tobiasz Cudnik

Attachment: 6235.patch added

comment:10 Changed 15 years ago by Garry Yao

Description: modified (diff)

@Tobias, I don't know how the block grouping feature (when nested blocks exist, style applied to the root block instead of contents), but it's problematic, considering the following case when applying the 'RTL' style:

<div>
<p dir="ltr">Paragraph 1</p>
<p>Paragraph 2</p>
</div>

I propose removing the 'getFullySelected' logic and just let it be as the same way with alignment and indentation command.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy