mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-01 15:22:35 -05:00
Allow default text field drag and drop behaviour.
This commit is contained in:
@@ -26,9 +26,13 @@
|
||||
}
|
||||
});
|
||||
$(window).on('dragover', function (e) {
|
||||
if (/^text/.test(e.target.type)) return; // Ignore text fields
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
$(document).on('dragenter', function (e) {
|
||||
if (/^text/.test(e.target.type)) return; // Ignore text fields
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if (!app.dragging && app.curRoom.id === 'teambuilder') {
|
||||
@@ -50,6 +54,8 @@
|
||||
e.originalEvent.dataTransfer.dropEffect = 'move';
|
||||
});
|
||||
$(window).on('drop', function (e) {
|
||||
if (/^text/.test(e.target.type)) return; // Ignore text fields
|
||||
|
||||
// The default team drop action for Firefox is to open the team as a
|
||||
// URL, which needs to be prevented.
|
||||
// The default file drop action for most browsers is to open the file
|
||||
|
||||
Reference in New Issue
Block a user