Skip to content

Commit

Permalink
Workaround regressions in Chrome and Safari (#12221 and #11111).
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Sep 5, 2014
1 parent 5b1f187 commit b46bd06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions bender.js
Expand Up @@ -45,9 +45,6 @@ var config = {
// IE8 (fails only in testing env - window.window === window gives false)
'tests/core/tools#test_clone_Window': 'env.ie && env.version == 8',

// Safari (#11111)
'tests/core/dom/range/enlarge#test_enlarge_element12': 'env.safari',

// Safari (#11980)
'tests/core/editable/keystrokes/delbackspacequirks/collapsed#test backspace #2': 'env.safari',
'tests/core/editable/keystrokes/delbackspacequirks/collapsed#test backspace #3': 'env.safari',
Expand Down
5 changes: 4 additions & 1 deletion core/dom/range.js
Expand Up @@ -1069,11 +1069,14 @@ CKEDITOR.dom.range = function( root ) {

isWhiteSpace = /[\s\ufeff]$/.test( siblingText );
} else {
// #12221 (Chrome) plus #11111 (Safari).
var offsetWidth0 = CKEDITOR.env.webkit ? 1 : 0;

// If this is a visible element.
// We need to check for the bookmark attribute because IE insists on
// rendering the display:none nodes we use for bookmarks. (#3363)
// Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041)
if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) ) {
if ( ( sibling.$.offsetWidth > offsetWidth0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) ) {
// We'll accept it only if we need
// whitespace, and this is an inline
// element with whitespace only.
Expand Down

0 comments on commit b46bd06

Please sign in to comment.