Skip to content

Commit

Permalink
Merge #15865 - Fix #12969 - Tap and hold will not dismiss Error box
Browse files Browse the repository at this point in the history
Pull-request: #15865
Fixes: #12969

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Feb 23, 2020
2 parents 731ddfe + 50c4bc2 commit aa4f18c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/designer/move.js
Expand Up @@ -2128,7 +2128,7 @@ AJAX.registerOnload('designer/move.js', function () {
});
$('#SaveAs').on('click', function () {
DesignerMove.saveAs();
$(document).ajaxStop(function () {
$(document).on('ajaxStop', function () {

This comment has been minimized.

Copy link
@williamdes

williamdes Feb 23, 2020

Author Member

seems to be a unrelated change introduced by me, yes I know.

$('#selected_value').on('click', function () {
$('#save_page_new').prop('checked', true);
});
Expand Down
14 changes: 12 additions & 2 deletions js/functions.js
Expand Up @@ -2466,8 +2466,18 @@ $(function () {
* Allows the user to dismiss a notification
* created with Functions.ajaxShowMessage()
*/
$(document).on('click', 'span.ajax_notification.dismissable', function () {
Functions.ajaxRemoveMessage($(this));
var holdStarter = null;
$(document).on('mousedown', 'span.ajax_notification.dismissable', function () {
holdStarter = setTimeout(function () {
holdStarter = null;
}, 250);
});

$(document).on('mouseup', 'span.ajax_notification.dismissable', function () {
if (holdStarter && event.which === 1) {
clearTimeout(holdStarter);
Functions.ajaxRemoveMessage($(this));
}
});
/**
* The below two functions hide the "Dismiss notification" tooltip when a user
Expand Down

0 comments on commit aa4f18c

Please sign in to comment.