-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from cksource/t/17028
[#17028] Tabbing through inline editor causes JavaScript error. fixes #424
- Loading branch information
Showing
15 changed files
with
195 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
tests/core/focusmanager/manual/typinginunfocusedinlineeditor.html
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
tests/core/focusmanager/manual/typinginunfocusedinlineeditor.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.inline-editor { | ||
background-color: #ccffcc; | ||
margin: 20px; | ||
padding: 10px; | ||
} |
40 changes: 40 additions & 0 deletions
40
tests/plugins/indentlist/manual/taberrorininlineeditor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<head> | ||
<link rel="stylesheet" href="../_assets/styles.css"> | ||
</head> | ||
<body> | ||
<script> | ||
if ( !CKEDITOR.env.chrome ) { | ||
bender.ignore(); | ||
} | ||
</script> | ||
<div class="inline-editor" id="inline1" contenteditable="true"> | ||
<p>Hello world</p> | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
<li>Three</li> | ||
</ul> | ||
</div> | ||
<div class="inline-editor" id="inline2" contenteditable="true"> | ||
<p>Hello world</p> | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
<li>Three</li> | ||
</ul> | ||
</div> | ||
<div class="inline-editor" id="inline3" contenteditable="true"> | ||
<p>Hello world</p> | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
<li>Three</li> | ||
</ul> | ||
</div> | ||
<script> | ||
CKEDITOR.inline( 'inline1' ); | ||
CKEDITOR.inline( 'inline2' ); | ||
CKEDITOR.inline( 'inline3' ); | ||
</script> | ||
</body> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@bender-tags: 4.7.1, 424, bug | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: floatingspace, toolbar, list, indentlist | ||
|
||
---- | ||
|
||
1. Open console. | ||
1. Click into 1st `Hello world`. | ||
1. Press `TAB` few times to cycle through other editors. | ||
1. There should be no error in the console. | ||
|
||
**Unexpected:** Error with status: `Uncaught TypeError: Cannot read property 'contains' of null` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* bender-tags: editor,unit */ | ||
/* bender-ckeditor-plugins: toolbar,indentlist */ | ||
/* bender-ui: collapsed */ | ||
|
||
( function() { | ||
'use strict'; | ||
|
||
bender.editor = { | ||
creator: 'inline' | ||
}; | ||
|
||
// #424 - https://dev.ckeditor.com/ticket/17028 | ||
bender.test( { | ||
'test tab in inline editor': function() { | ||
var editor = this.editor; | ||
|
||
editor.focus(); | ||
var sel = editor.getSelection(); | ||
sel.removeAllRanges(); | ||
editor.fire( 'key', { | ||
domEvent: { | ||
getKey: function() { | ||
return 9; | ||
} | ||
}, | ||
keyCode: 9 | ||
} ); | ||
assert.pass(); | ||
} | ||
} ); | ||
} )(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.inline-editor { | ||
background-color: #ccffcc; | ||
margin: 20px; | ||
padding: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* bender-tags: editor,unit */ | ||
/* bender-ckeditor-plugins: toolbar,tab */ | ||
/* bender-ui: collapsed */ | ||
|
||
( function() { | ||
'use strict'; | ||
|
||
bender.editor = { | ||
creator: 'inline' | ||
}; | ||
|
||
// #424 - https://dev.ckeditor.com/ticket/17028 | ||
bender.test( { | ||
'test tab in inline editor': function() { | ||
var editor = this.editor; | ||
|
||
editor.focus(); | ||
var sel = editor.getSelection(); | ||
sel.removeAllRanges(); | ||
editor.fire( 'key', { | ||
domEvent: { | ||
getKey: function() { | ||
return 9; | ||
} | ||
}, | ||
keyCode: 9 | ||
} ); | ||
assert.pass(); | ||
} | ||
} ); | ||
} )(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<head> | ||
<link rel="stylesheet" href="../_assets/styles.css"> | ||
</head> | ||
<body> | ||
<script> | ||
if ( !CKEDITOR.env.chrome ) { | ||
bender.ignore(); | ||
} | ||
</script> | ||
<div class="inline-editor" id="inline1" contenteditable="true"> | ||
<p>Hello world</p> | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
<li>Three</li> | ||
</ul> | ||
</div> | ||
<div class="inline-editor" id="inline2" contenteditable="true"> | ||
<p>Hello world</p> | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
<li>Three</li> | ||
</ul> | ||
</div> | ||
<div class="inline-editor" id="inline3" contenteditable="true"> | ||
<p>Hello world</p> | ||
<ul> | ||
<li>One</li> | ||
<li>Two</li> | ||
<li>Three</li> | ||
</ul> | ||
</div> | ||
<script> | ||
CKEDITOR.inline( 'inline1' ); | ||
CKEDITOR.inline( 'inline2' ); | ||
CKEDITOR.inline( 'inline3' ); | ||
</script> | ||
</body> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@bender-tags: 4.7.1, 424, bug | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: floatingspace, toolbar, list, tab | ||
|
||
---- | ||
|
||
1. Open console. | ||
1. Click into 1st `Hello world`. | ||
1. Press `TAB` few times to cycle through other editors. | ||
1. There should be no error in the console. | ||
|
||
**Unexpected:** Error with status: `Uncaught TypeError: Cannot read property 'contains' of null` |