Opened 11 years ago

Closed 11 years ago

#11021 closed Bug (fixed)

Widgets: Error thrown when moving focus from widget to editable by elements path

Reported by: Marek Lewandowski Owned by: Olek Nowodziński
Priority: Must have (possibly next milestone) Milestone: CKEditor 4.3.2
Component: General Version: 4.3 Beta
Keywords: Cc:

Description (last modified by Marek Lewandowski)

After talk with PK we decided to create yet separate ticket for original issue reported in #10869, since issue required more sophisticated solution.

  1. Open samples/plugins/image2/image2.html
  2. Select a widget.
  3. In elementspath, click "body"
  4. An error is thrown (Chrome, Firefox):
    Uncaught IndexSizeError: Index or size was negative, or greater than the allowed value. 
    
    IE9:
    SCRIPT5022: DOM Exception: INDEX_SIZE_ERR (1) 
    

additional info:

  1. Issue is caused because hiddenSelectionContainer is not removed in right time, and created selection has offset bigger by one.
  2. editor.getSelection().reset() call placed before range.selectNodeContents( element ) statement did the job, however it should be placed somewhere deeper to be reused. Maybe selectNodeContents itself?
  3. this issue is originated from #10869

Change History (11)

comment:1 Changed 11 years ago by Marek Lewandowski

Description: modified (diff)

comment:2 Changed 11 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.3
Status: newconfirmed
Version: 4.3 Beta

comment:3 Changed 11 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 4.3.1

comment:4 Changed 11 years ago by Marek Lewandowski

Description: modified (diff)

comment:5 Changed 11 years ago by Piotrek Koszuliński

Summary: Widgets: Error thrown with elementspath #2Widgets: Error thrown when moving focus from widget to editable by elements path

comment:6 Changed 11 years ago by Piotrek Koszuliński

Priority: NormalHigh

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

Milestone: CKEditor 4.3.1CKEditor 4.3.2

Rearranged tickets due to new ones which have high priority.

comment:8 Changed 11 years ago by Olek Nowodziński

Owner: set to Olek Nowodziński
Status: confirmedassigned

comment:9 Changed 11 years ago by Olek Nowodziński

Status: assignedreview

Pushed solution to t/11021 (+corresponding test branch).

comment:10 Changed 11 years ago by Piotrek Koszuliński

Status: reviewreview_passed

I pushed additional commits to dev and tests to fix following issues:

  • tests were not passing in some IEs because too precise ranges comparison didn't assume selection engines differences,
  • patch for dev was breaking all selections anchored in editable, because it didn't check if hidden selection container exists; TC: place caret anywhere, press body in elements path,
  • patch for dev did not fix ranges for MS selections.

comment:11 Changed 11 years ago by Olek Nowodziński

Resolution: fixed
Status: review_passedclosed

git:ebd3500 landed in master (fe71804 tests).

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