mirror of
https://github.com/wekan/wekan.git
synced 2025-12-30 14:18:48 +01:00
Use on instead of bind
Suggested by deepcode.ai.
This commit is contained in:
parent
b2fee6a6c1
commit
52d633ca69
2 changed files with 3 additions and 3 deletions
|
|
@ -39,8 +39,8 @@
|
||||||
};
|
};
|
||||||
return this.each(function() {
|
return this.each(function() {
|
||||||
const element = this;
|
const element = this;
|
||||||
$(element).bind('dragenter dragover dragleave', stopFn);
|
$(element).on('dragenter dragover dragleave', stopFn);
|
||||||
return $(element).bind('drop', function(event) {
|
return $(element).on('drop', function(event) {
|
||||||
stopFn(event);
|
stopFn(event);
|
||||||
const files = event.dataTransfer.files;
|
const files = event.dataTransfer.files;
|
||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
options = $.extend({}, defaults, options);
|
options = $.extend({}, defaults, options);
|
||||||
return this.each(function() {
|
return this.each(function() {
|
||||||
const element = this;
|
const element = this;
|
||||||
return $(element).bind('paste', function(event) {
|
return $(element).on('paste', function(event) {
|
||||||
const types = event.clipboardData.types;
|
const types = event.clipboardData.types;
|
||||||
const items = event.clipboardData.items;
|
const items = event.clipboardData.items;
|
||||||
for (let i = 0; i < types.length; i++) {
|
for (let i = 0; i < types.length; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue