Make Linking and Internal Linking keyboard-friendly and URL-paste-friendly. props koopersmith. fixes #15544

git-svn-id: https://develop.svn.wordpress.org/trunk@16561 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2010-11-24 06:44:46 +00:00
parent ac67c65fe4
commit 2cc12c224e
10 changed files with 201 additions and 77 deletions
@@ -36,6 +36,21 @@
};
}
});
$(document).ready(function() {
$.widget("wp.wpdialog", $.ui.dialog, {
open: function() {
// Initialize tinyMCEPopup if it exists.
if ( tinyMCEPopup )
tinyMCEPopup.init();
// Open the dialog.
$.ui.dialog.prototype.open.apply( this, arguments );
// WebKit leaves focus in the TinyMCE editor unless we shift focus.
this.element.focus();
this._trigger('refresh');
}
});
});
tinymce.create('tinymce.WPWindowManager:tinymce.InlineWindowManager', {
WPWindowManager : function(ed) {
@@ -60,12 +75,9 @@
t.element = t.windows[ f.id ] = element;
// Store selection
t.bookmark = t.editor.selection.getBookmark();
t.bookmark = t.editor.selection.getBookmark(1);
if ( tinyMCEPopup )
tinyMCEPopup.init();
element.dialog({
element.wpdialog({
title: f.title,
width: f.width,
height: f.height,
@@ -75,7 +87,7 @@
});
},
close : wpDialogFn(function() {
this.element.dialog('close');
this.element.wpdialog('close');
})
});