Skip to content

Commit

Permalink
removed jQuery.browser calls
Browse files Browse the repository at this point in the history
jQuery.browser no longer exists in jQuery nor in jQuery migrate. A quick
check in Opera and IE11 suggests that both parts that used it are no
longer needed so they were simply removed.

More browser tests especially for the resize handling in the media manager
are recommended.
  • Loading branch information
splitbrain committed Nov 26, 2016
1 parent 5170fe9 commit 0a1c13c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
8 changes: 1 addition & 7 deletions lib/scripts/editor.js
Expand Up @@ -25,13 +25,7 @@ var dw_editor = {
return;
}

// in Firefox, keypress doesn't send the correct keycodes,
// in Opera, the default of keydown can't be prevented
if (jQuery.browser.opera) {
$editor.keypress(dw_editor.keyHandler);
} else {
$editor.keydown(dw_editor.keyHandler);
}
$editor.keydown(dw_editor.keyHandler);

},

Expand Down
10 changes: 0 additions & 10 deletions lib/scripts/media.js
Expand Up @@ -518,16 +518,6 @@ var dw_mediamanager = {
// set width of file panel
$filePanel.width(relWidthNonResizable + '%');

// FIXME: please fix without browser sniffing
if (!jQuery.browser.webkit) {
$resizables.each(function () {
var w = jQuery(this).width();
w = (99.99 * w / widthFull);
w += "%";
jQuery(this).width(w);
});
}

dw_mediamanager.resize();

dw_mediamanager.opacity_slider();
Expand Down

0 comments on commit 0a1c13c

Please sign in to comment.