Skip to content

Commit

Permalink
MDL-47484 atto_indent: Prevent loss of rangy markers in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
aolley committed Oct 1, 2014
1 parent d07b030 commit 8180281
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ Y.namespace('M.atto_indent').Button = Y.Base.create('button', Y.M.editor_atto.Ed
blockquotes = this.editor.all('blockquote'),
count = blockquotes.size();

// Remove display:none from rangy markers so browser doesn't delete them.
this.editor.all('.rangySelectionBoundary').setStyle('display', null);

// Mark all existing block quotes in case the user has actually added some.
blockquotes.addClass('pre-existing');

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ Y.namespace('M.atto_indent').Button = Y.Base.create('button', Y.M.editor_atto.Ed
blockquotes = this.editor.all('blockquote'),
count = blockquotes.size();

// Remove display:none from rangy markers so browser doesn't delete them.
this.editor.all('.rangySelectionBoundary').setStyle('display', null);

// Mark all existing block quotes in case the user has actually added some.
blockquotes.addClass('pre-existing');

Expand Down
3 changes: 3 additions & 0 deletions lib/editor/atto/plugins/indent/yui/src/button/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ Y.namespace('M.atto_indent').Button = Y.Base.create('button', Y.M.editor_atto.Ed
blockquotes = this.editor.all('blockquote'),
count = blockquotes.size();

// Remove display:none from rangy markers so browser doesn't delete them.
this.editor.all('.rangySelectionBoundary').setStyle('display', null);

// Mark all existing block quotes in case the user has actually added some.
blockquotes.addClass('pre-existing');

Expand Down

0 comments on commit 8180281

Please sign in to comment.