Skip to content

Commit

Permalink
🚨 Use jQuery 'on' instead of specific event functions
Browse files Browse the repository at this point in the history
  • Loading branch information
frncesc committed Jun 10, 2021
1 parent def2590 commit 5b5817e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/activities/text/TextActivityBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export class TextActivityBasePanel extends ActivityPanel {

if ($popup) {
$popup.css({ display: '' });
$popup.click();
$popup.trigger('click');

this.$currentPopup = $popup;
if (maxTime) {
Expand Down
2 changes: 1 addition & 1 deletion src/activities/textGrid/CrossWord.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class CrossWordPanel extends ActivityPanel {
'background-position': 'center',
'border-radius': 6,
'z-index': 10
}).click(() => {
}).on('click', () => {
this.advance = type === 'acrossClues' ?
this.advance === 'ADVANCE_RIGHT' ?
'NO_ADVANCE' : 'ADVANCE_RIGHT' :
Expand Down
2 changes: 1 addition & 1 deletion src/boxes/ActiveBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ export class ActiveBox extends AbstractBox {
disabled: disabled
})
.html(this.toString())
.click(ev => {
.on('click', ev => {
// Check if event was produced by a mouse click
if (ev.originalEvent && (ev.originalEvent.pageX !== 0 || ev.originalEvent.pageY !== 0)) {
// Mouse clicks should be processed odirectly by the canvas, so ignore this accessible event
Expand Down
2 changes: 1 addition & 1 deletion src/skins/CustomSkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class CustomSkin extends Skin {
this.msgBox = new ActiveBox();
this.msgBox.role = 'message';
this.$msgBoxDiv = $('<div/>', { class: 'JClicMsgBox' })
.click(() => {
.on('click', () => {
this.msgBox.playMedia(ps);
return false;
});
Expand Down
2 changes: 1 addition & 1 deletion src/skins/DefaultSkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class DefaultSkin extends Skin {
this.msgBox = new ActiveBox();
this.msgBox.role = 'message';
this.$msgBoxDiv = $('<div/>', { class: 'JClicMsgBox' })
.click(() => {
.on('click', () => {
this.msgBox.playMedia(ps);
return false;
});
Expand Down
2 changes: 1 addition & 1 deletion src/skins/Skin.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class Skin extends Container {
this.$infoHead = $('<div/>', { class: 'infoHead' })
.append($('<div/>', { class: 'headTitle unselectableText' })
.append($(this.appLogo, { 'aria-label': msg }).css({ width: '1.5em', height: '1.5em', 'vertical-align': 'bottom' })
.dblclick(() => {
.on('dblclick', () => {
// Double click on JClic logo is a hidden method to increase verbosity on Javascript console
setLogLevel('all');
log('trace', 'Log level set to "trace"');
Expand Down

0 comments on commit 5b5817e

Please sign in to comment.