PHRAS-3396_ffox-err-drop-record-on-term_MASTER

fix : drop record on term is ok with ffox
[skip ci]
This commit is contained in:
jygaulier
2021-03-16 17:07:48 +01:00
parent c90e4f3e84
commit c8caea396b
3 changed files with 17 additions and 3 deletions

View File

@@ -11578,7 +11578,11 @@ var thesaurusService = function thesaurusService(services) {
(0, _jquery2.default)('#THPD_T_tree', $container).removeClass('draggingOver');
(0, _jquery2.default)('#THPD_T_tree>LI', $container).removeClass('draggingOver');
var target = (0, _jquery2.default)(event.toElement);
// the event relates from the whole tx zone (<ul>), we must find the exact element of the mouseup
// too bad, jquery does not seem to handle that in a cross-browser way.
var target = typeof event.toElement === 'undefined' ? (0, _jquery2.default)(event.originalEvent.target) // ffox
: (0, _jquery2.default)(event.toElement); // chrome
var sbas_id = target.data('sbas_id').toString(); // set on html by ThesaurusXmlHttpController.php
var tx_term_id = target.data('tx_term_id').toString(); // set on html by ThesaurusXmlHttpController.php

View File

@@ -11578,7 +11578,11 @@ var thesaurusService = function thesaurusService(services) {
(0, _jquery2.default)('#THPD_T_tree', $container).removeClass('draggingOver');
(0, _jquery2.default)('#THPD_T_tree>LI', $container).removeClass('draggingOver');
var target = (0, _jquery2.default)(event.toElement);
// the event relates from the whole tx zone (<ul>), we must find the exact element of the mouseup
// too bad, jquery does not seem to handle that in a cross-browser way.
var target = typeof event.toElement === 'undefined' ? (0, _jquery2.default)(event.originalEvent.target) // ffox
: (0, _jquery2.default)(event.toElement); // chrome
var sbas_id = target.data('sbas_id').toString(); // set on html by ThesaurusXmlHttpController.php
var tx_term_id = target.data('tx_term_id').toString(); // set on html by ThesaurusXmlHttpController.php

View File

@@ -201,7 +201,13 @@ const thesaurusService = services => {
$('#THPD_T_tree', $container).removeClass('draggingOver');
$('#THPD_T_tree>LI', $container).removeClass('draggingOver');
const target = $(event.toElement);
// the event relates from the whole tx zone (<ul>), we must find the exact element of the mouseup
// too bad, jquery does not seem to handle that in a cross-browser way.
const target = typeof(event.toElement) === 'undefined' ?
$(event.originalEvent.target) // ffox
:
$(event.toElement); // chrome
const sbas_id = target.data('sbas_id').toString(); // set on html by ThesaurusXmlHttpController.php
const tx_term_id = target.data('tx_term_id').toString(); // set on html by ThesaurusXmlHttpController.php