Opened 11 years ago
Closed 11 years ago
#13114 closed Bug (fixed)
#13027's regression - inf loop on dialog open
| Reported by: | Piotrek Koszuliński | Owned by: | Marek Lewandowski | 
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.4.8 | 
| Component: | General | Version: | 4.4.8 | 
| Keywords: | Cc: | 
Description
Crashes any browser - http://tests.ckeditor.dev:1030/tests/plugins/dialog/beforeunload
Change History (5)
comment:1 Changed 11 years ago by
| Owner: | set to Piotrek Koszuliński | 
|---|---|
| Status: | new → assigned | 
comment:2 Changed 11 years ago by
| Owner: | changed from Piotrek Koszuliński to Marek Lewandowski | 
|---|
comment:3 Changed 11 years ago by
| Status: | assigned → review | 
|---|
comment:4 Changed 11 years ago by
Well, the reason for the bug was that dialog._.currentFocusIndex was inited with -1 in case when it had no tabs.
It's expected to init currentFocusIndex to the index before the first focusable item. By default, shortly after that changeFocus( 1 ) is called which is going to loop through focusables to find the first focusable to focus (it will be first visible focusable).
It's performed within a loop in changeFocus function and it provides extra handling for -1 case, but it's only valid for non tabbed dialog.
So long story short, the problem for that was invalid init value in case of tabless dialog.
comment:5 Changed 11 years ago by
| Resolution: | → fixed | 
|---|---|
| Status: | review → closed | 
Fixed with git:7c2d0b5.

Pushed to t/13114 at dev.
I tried to create unittests for created code, but it turned out to take far too much time, caused mainly due to numerous timeouts, inlined listeners.