Skip to content

Commit

Permalink
UI: fix rename dialog flickering
Browse files Browse the repository at this point in the history
problem:
rename dialog sometimes flickered in Firefox
it flickered when the button label was clicked,
it made the event bubble and triggered the click event multiple times.
trying to open dialog when already opened makes it flicker intentionally

fixes: #7479

Signed-off-by: Pranam Lashkari <[email protected]>
Change-Id: I290c905ac321650bd7979495c78de7d66f188ffd
  • Loading branch information
lpranam authored and eszkadev committed Oct 26, 2023
1 parent 83c490b commit 7434cb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion browser/src/control/Control.JSDialogBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,8 @@ L.Control.JSDialogBuilder = L.Control.extend({

$(control.container).unbind('click.toolbutton');
if (!builder.map.isLockedItem(data)) {
$(control.container).click(function () {
$(control.container).click(function (e) {
e.preventDefault();
builder.map.dispatch(data.command);
});
}
Expand Down

0 comments on commit 7434cb0

Please sign in to comment.