Opened 5 years ago

Closed 5 years ago

#6957 closed Bug (fixed)

Find is not highlighting the word in read-only blocks

Reported by: satya Owned by: garry.yao
Priority: Normal Milestone:
Component: Core : Styles Version: 3.5
Keywords: IBM Cc: damo, joek, jamescun

Description

To reproduce the defect:

  1. copy the following code and paste it in to source
    <p >
    	first editable paragraph.</p>
    <p contenteditable = "false" >
    	first non editable paragraph.</p>
    <p contenteditable = "false" >
    	second non editable paragraph.</p>
    <p>
    	second editable paragraph.</p>
    
  1. click on Find icon and enter the word non in find what field and click find button.

Expected Result:

non word in the first non editable paragraph should be highlighted.

Expected Result:

Find is not highlighting the non word in the first non editable but when we close the Find and Replace dialog you will see the word getting highlighted.

Attachments (2)

6957.patch (5.5 KB) - added by garry.yao 5 years ago.
6957_2.patch (3.3 KB) - added by garry.yao 5 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 5 years ago by Saare

  • Status changed from new to confirmed
  • Version changed from 3.4 to 3.5

comment:2 Changed 5 years ago by wwalc

  • Cc james c added; james c removed

As reported in #7049, using the following code:

<p contenteditable="false">inside read-only paragraph</p>

results in a javascript error:

Message: currentNode is null 
Line: 455
URI: /ckeditor/_source/plugins/styles/plugin.js

comment:3 Changed 5 years ago by wwalc

  • Cc jamescun added; james c removed

comment:4 Changed 5 years ago by typeof

What do you think about adding a property called something like "appliedToReadOnly" to the CKEDITOR.style class? And then modify the style and find plugins accordingly?

comment:5 follow-up: Changed 5 years ago by garry.yao

  • Component changed from General to Core : Styles

Find highlight is current done through styling in all browsers, while actually IE is the only browser that requires it (for not supporting selection mark without holding focus), highlight in the rest of browsers should be simplified by just making a plain selection, which will be free of the read-only styling limitation.

comment:6 in reply to: ↑ 5 Changed 5 years ago by fredck

Replying to garry.yao:

Find highlight is current done through styling in all browsers, while actually IE is the only browser that requires it (for not supporting selection mark without holding focus), highlight in the rest of browsers should be simplified by just making a plain selection, which will be free of the read-only styling limitation.

How would we handle it on IE at this point?

Changed 5 years ago by garry.yao

comment:7 follow-up: Changed 5 years ago by garry.yao

  • Owner set to garry.yao
  • Status changed from confirmed to review

Vote for using also native selection on IE to present, the only sacrifice is that focus will be moved out of dialog temporarily when displaying the highlight.

comment:8 Changed 5 years ago by garry.yao

Ticket Test:
run OR view source.

Last edited 5 years ago by garry.yao (previous) (diff)

comment:9 in reply to: ↑ 7 Changed 5 years ago by fredck

  • Status changed from review to review_failed

Replying to garry.yao:

Vote for using also native selection on IE to present, the only sacrifice is that focus will be moved out of dialog temporarily when displaying the highlight.

This is not an acceptable solution. It breaks the keyboard navigation on the dialog as well as bringing accessibility issues.

Changed 5 years ago by garry.yao

comment:10 Changed 5 years ago by garry.yao

  • Status changed from review_failed to review

Ticket tests updated.

comment:11 Changed 5 years ago by Saare

  • Status changed from review to review_passed

comment:12 Changed 5 years ago by garry.yao

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

Fixed with [7211].

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