Skip to content

Commit

Permalink
Merge branch 't/12865' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Mar 12, 2015
2 parents e112a76 + 53106ca commit f887b79
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/notification/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ Notification.prototype = {
notificationElement.append( notificationCloseElement );

notificationCloseElement.on( 'click', function() {
// Focus editor on close (#12865)
notification.editor.focus();

notification.hide();
} );

Expand Down
33 changes: 33 additions & 0 deletions tests/plugins/notification/manual/focus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div id="editor1" contenteditable="true" style="width:650px;">
<p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans Neil Armstrong and Buzz Aldrin, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
<p>Armstrong spent about three and a half two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, Michael Collins, piloted the command spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
<p>Broadcasting and <em>quotes</em> </p>
<p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
<p>One small step for [a] man, one giant leap for mankind.</p>
<p>Apollo 11 effectively ended the Space Race and fulfilled a national goal proposed in 1961 by the late U.S. President John F. Kennedy in a speech before the United States Congress:</p>
<p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
<p>Technical details </p>
<p><strong>Mission crew</strong></p>
<p>PositionAstronaut</p>
<p>CommanderNeil A. Armstrong</p>
<p>Command Module PilotMichael Collins</p>
<p>Lunar Module PilotEdwin "Buzz" E. Aldrin, Jr.</p>
<p>Launched by a <strong>Saturn V</strong> rocket from Kennedy Space Center in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of NASA's Apollo program. The Apollo spacecraft had three parts:</p>
<p><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</p>
<p><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</p>
<p><strong>Lunar Module</strong> for landing on the Moon.</p>
<p>After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the Sea of Tranquility. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the Pacific Ocean on July 24.</p>
<p>Source: Wikipedia.org</p>
</div>
<script>
CKEDITOR.disableAutoInline = true;

var editor = CKEDITOR.inline( 'editor1', {
extraPlugins: 'notification',
toolbar: [ [ 'Undo', 'Redo' ], [ 'Bold', 'Italic', 'Underline' ] ]
} );

editor.once( 'instanceReady', function () {
editor.showNotification( 'foo', 'warning' );
} );
</script>
9 changes: 9 additions & 0 deletions tests/plugins/notification/manual/focus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@bender-tags: 4.5.0
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, basicstyles, notification, floatingspace
@bender-include: _helpers/manualplayground.js

1. Focus editor.
2. Close notification using "x" button.

Expected result: editor should be focused.

0 comments on commit f887b79

Please sign in to comment.