Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Jquery version 3 fixes #65

Merged
merged 2 commits into from
Dec 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions assets/redactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@
if (this.opts.linebreaks)
{
var $next = $formatted.next().next();
if ($next.size() != 0 && $next[0].tagName === 'BR')
if ($next.length != 0 && $next[0].tagName === 'BR')
{
$next.remove();
}
Expand Down Expand Up @@ -1460,7 +1460,7 @@
if (this.start) return;
if (this.rtePaste) return;

if ($(e.target).closest('.redactor-editor, .redactor-toolbar, .redactor-dropdown').size() !== 0)
if ($(e.target).closest('.redactor-editor, .redactor-toolbar, .redactor-dropdown').length !== 0)
{
return;
}
Expand Down Expand Up @@ -3620,7 +3620,7 @@
var last = this.$editor.children().last();
this.$editor.focus();

if (last.size() === 0) return;
if (last.length === 0) return;
if (this.utils.isEmpty(this.$editor.html()))
{

Expand Down Expand Up @@ -5653,7 +5653,7 @@
if (this.utils.browser('mozilla'))
{
var td = $(this.keydown.current).closest('td', this.$editor[0]);
if (td.size() !== 0 && td.text() !== '')
if (td.length !== 0 && td.text() !== '')
{
e.preventDefault();
return false;
Expand Down Expand Up @@ -6433,7 +6433,7 @@
$children.find('br').remove();
$children.append(this.selection.getMarkerAsHtml());

if (this.opts.linebreaks && this.utils.browser('mozilla') && $children.size() == 2 && this.utils.isEmpty($children.eq(1).text()))
if (this.opts.linebreaks && this.utils.browser('mozilla') && $children.length == 2 && this.utils.isEmpty($children.eq(1).text()))
{
$children.eq(1).remove();
}
Expand Down Expand Up @@ -6910,7 +6910,7 @@
inValues = typeof observe['in'] != 'undefined' ? observe['in'] : false,
outValues = typeof observe['out'] != 'undefined' ? observe['out'] : false;

if ($current.closest(element).size() > 0)
if ($current.closest(element).length > 0)
{
this.observe.setDropdownProperties($item, inValues, outValues);
}
Expand Down Expand Up @@ -9544,4 +9544,4 @@
// constructor
Redactor.prototype.init.prototype = Redactor.prototype;

})(jQuery);
})(jQuery);