Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modal('show') after a modal('hide') doesn't work #3902

Closed
anuraguniyal opened this issue Jun 21, 2012 · 22 comments
Closed

modal('show') after a modal('hide') doesn't work #3902

anuraguniyal opened this issue Jun 21, 2012 · 22 comments
Labels

Comments

@anuraguniyal
Copy link

immediately after hiding a modal, if a show call is issued it doesn't work
e.g.

$('#show_modal').click(function(){
   $('#test-modal').modal('show')
   $('#test-modal').modal('hide')
   $('#test-modal').modal('show')
})


Looks like end effect should be a modal dialog shown, but instead modal is hidden with a black screen see it in action here http://jsfiddle.net/anuraguniyal/qzAmP/

For time being I am working around it by issuing a setTimeout of 1000 msec, because looks like bootstrap takes 500 msec to hide modal in a timeout

@EricWarnke
Copy link

Have you tried using

$('#test-modal').show().on('shown', function() { 
    $('#test-modal').modal('hide') 
});

@anuraguniyal
Copy link
Author

I haven't tried that but that is also not possible generally because hide may be called from one function and show will be called from another function e.g. If I have a single modal dialog for displaying error, I got an error and displayed a msg with a button to take action, action button hides modal calls another function which has again some error and it shows the modal which doesn't come up as mentioned above

@saibayadon
Copy link

The issue is that .modal() is async, so those three calls will be fired one after another without waiting the other one to finish, thus causing issues.

Even using toggle causes issue in this scenario. The most sane thing would be to patch the modal proto to add a callback.

@canteroalejandro
Copy link

Hi, I have tried this as follows.

$(".btn-plus").click(function(){
$('#new_passenger').modal("show").on('hide', function() {
$('#new_passenger').modal('hide')
});
});

I worked.
sorry for my english.. =)

@fat
Copy link
Member

fat commented Feb 8, 2013

was a bug with that – fixed in 2.3

@fat fat closed this as completed Feb 8, 2013
@eskimoblood
Copy link

Still there in 2.3.1 : http://jsfiddle.net/ngegC/

@Lutxi
Copy link

Lutxi commented May 12, 2013

My solution with the same problem was put a settimeout in the next 'hide' and 'show':
$('#show_modal').click(function(){
$('#test-modal').modal('show')
setTimeout(function(){$('#test-modal').modal('hide')}, 10)
setTimeout(function(){$('#test-modal').modal('show')}, 900)
})
I know that this isn't a good solution but resolve my problem.
Excuse my English I'm learning...

@WesleyKapow
Copy link

As eskimoblood indicates, this is still an issue with 2.3.1. Using a test for if the modal is visible and if so using a on "hidden" should provide a reasonable work around.

@jimbuho
Copy link

jimbuho commented Jul 8, 2013

Solution about every bug like this one is three steps:

1 - Use bootstrap-modal.js
2 - Set max backdrop like this: $.fn.modalmanager.defaults.backdropLimit = 1;
3 - Use this modal header (check stackable topic):
http://jschr.github.io/bootstrap-modal/
4 - Don Use Button tag in order to open modals, use Links (check stackable topic):
http://jschr.github.io/bootstrap-modal/

That tips solves that and more bugs about bootstrap modals

Sorry my english and hope it helps

@janvanderhaegen
Copy link

Ugh...
My workaround was to do a $('body') and see if it has the class 'modal-open'. If not -> open the modal. If yes, subscribe the .one('hidden.bs.modal', function(){ open the modal}) and call close() first

@narainmittal
Copy link

I used the $timeout service as I'm using angular. It works most of the times, but the only problem is choosing a reasonable timeout value, since it can vary a lot with browsers/ environments.

@kimsy
Copy link

kimsy commented Mar 3, 2016

I was just searching for this myself. Ended up with the following solution:

var hideInProgress = false;
var showModalId = '';

function showModal(elementId) {
    if (hideInProgress) {
        showModalId = elementId;
    } else {
        $("#" + elementId).modal("show");
    }
};

function hideModal(elementId) {
    hideInProgress = true;
    $("#" + elementId).on('hidden.bs.modal', hideCompleted);
    $("#" + elementId).modal("hide");

    function hideCompleted() {
        hideInProgress = false;
        if (showModalId) {
            showModal(showModalId);
        }
        showModalId = '';
        $("#" + elementId).off('hidden.bs.modal');
    }
};

The hideModal function sets a flag that it is currently hiding a modal. When it is done it resets the flag. If a modal tries to open while closing is in progress, the id is saved and when closing is complete it shows the modal. This ensures that as long as you call "hideModal" before "showModal", the modal is closed before the next one is opened.

@daryllabar
Copy link

daryllabar commented Nov 3, 2016

I had to tweak @kimsy's version in case a show gets called before the shown is complete. Here is a fiddle version with it working .

I created a Typescript version as well that handles not showing a Modal if the hide is called before the show is ever triggered

export module BootstrapExtension {
    let _actionInProgress = false;
    let _nextActionQueue = [] as ActionQueueInstance[];

    export type ModalAction = "hide" | "show";
    export interface ModalOptions {
        backdrop?: boolean | "static";
        keyboard?: boolean;
        focus?: boolean;
        show?: boolean;
    }

    interface ActionQueueInstance {
        modal: JQuery;
        options: ModalOptions | ModalAction;
    }

    /**
     * Lot's of fun issues arise when attempting to display a modal more than once, before it finishes loading
     * https://github.com/twbs/bootstrap/issues/3902
     * http://jsfiddle.net/daryllabar/npn4wvjm/
     * @param modal Id of the modal, or JQuery object of the modal
     * @param options
     */
    export function safeModal(modalOrId: string | JQuery, options?: ModalOptions | ModalAction): JQuery {
        if (!modalOrId) {
            return modalOrId as JQuery;
        }
        const modal = typeof modalOrId === "string" ? $(`#${modalOrId}`) : modalOrId;
        const action = getAction(options);

        if (_actionInProgress) {
            if (action === "hide") {
                for (let i = 0; i < _nextActionQueue.length; i++) {
                    const futureAction = _nextActionQueue[i];
                    if (futureAction.modal === modal && getAction(futureAction.options) === "show") {
                        // hide called when show is waiting to execute, clear both
                        _nextActionQueue.splice(i, 1);
                        return modal;
                    }
                }
            }
            _nextActionQueue.push({
                modal: modal,
                options: options
            });
            return modal;
        }

        const postEventName = getPostEventName(action);
        _actionInProgress = true;
        modal.on(postEventName, clearInProgress);
        modal.modal(options);

        function clearInProgress() {
            _actionInProgress = false;
            modal.off(postEventName, clearInProgress);
            if (_nextActionQueue.length > 0) {
                const next = _nextActionQueue.shift();
                safeModal(next.modal, next.options);
            }
        }

        return modal;
    };

    function getAction(options: ModalOptions | ModalAction): ModalAction {
        if (isModalAction(options)) {
            return options;
        } else if (!options) {
            return "show";
        } else {
            return options.show ? "show" : "hide";
        }
    }

    function getPostEventName(action: ModalAction): string {
        const prefix = action === "hide" ? "hidden" : "shown";
        return prefix + ".bs.modal";
    }

    export function isModalAction(arg: any): arg is ModalAction {
        switch (arg) {
            case "hide":
            case "show":
            case "toggle":
                return true;
            default:
                return false;
        }
    }
}

@gcishevs
Copy link

As a workaround you can remove "fade" class from your modal. If you need to prevent user to close the modal on click you need to add data-backdrop="static" attribute to your modal.

@kirankumardm141
Copy link

The below statements show how to open/reopen Modal without using bootstrap.

Add two classes in css

  1. .hide_block{
    display:none !important;
    }
  2. .display_block{
    display:block !important;
    }

And then use the below jQuery to reopen the modal if it is closed.

$("#Modal").removeClass('hide_block');
$("#Modal").addClass('display_block');
$("Modal").show("slow");

It worked fine for me :)

@alexsazo
Copy link

Based on this answer I've made it with this code:

$(modal_selector).on('hidden.bs.modal', function(e){ $(modal_selector).data('bs.modal', null); });

It looks that everytime the modal is hidden, it must to be reinitialized, so, you catch "hidden.bs.modal" and reinitialize the modal with .data('bs.modal', null);

It worked fine for me :)

@scubajorgen
Copy link

scubajorgen commented Apr 9, 2020

Execution of the .modal() method takes time. If during execution the next modal() is called, it has no effect (see documentation). For a please wait modal I created following solution

var showPleaseWait=0;

function pleaseWaitInitialize()
{
    $('#pleaseWaitDialog').on('shown.bs.modal', function (e) {
        if (!showPleaseWait)
        {
            $("#pleaseWaitDialog").modal("hide");
        }
   });
}

function pleaseWaitShow()
{
    showPleaseWait=1;
    $("#pleaseWaitDialog").modal("show");
}

function pleaseWaitHide()
{
    showPleaseWait=0;
    $("#pleaseWaitDialog").modal("hide");
}

In this way whichever if the modal("hide") in pleaseWaitHide() has no effect because .modal("show") isn't ready, the 2nd modal("hide") in the ready call back is taking effect.
Of course this concept can be extended to your problem

@lukeracortes
Copy link

$('#show_modal').click(function () { $('#test-modal').modal('show'); $('#test-modal').on('shown.bs.modal', function () { $('#test-modal').modal('hide'); $('#test-modal').on('hidden.bs.modal', function () { $('#test-modal').modal('show'); }); }); });

https://getbootstrap.com/docs/3.4/javascript/#modals-methods

@HigorSenna
Copy link

HigorSenna commented Jan 11, 2021

Hi guys, in my case, I removed class="fade" of my modal, and worked!
I don't understood what, but worked.

before:

<div class="modal fade vertical-center col-md-12 col-md-offset-5" id="loading" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> ... </div>

AFTER:

<div class="modal vertical-center col-md-12 col-md-offset-5" id="loading" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">...</div>

then, I used: $('#loading').modal('toggle')

@bernie-ning
Copy link

My solution with the same problem was put a settimeout in the next 'hide' and 'show':
$('#show_modal').click(function(){
$('#test-modal').modal('show')
setTimeout(function(){$('#test-modal').modal('hide')}, 10)
setTimeout(function(){$('#test-modal').modal('show')}, 900)
})
I know that this isn't a good solution but resolve my problem.
Excuse my English I'm learning...

sometimes still not working, excuse for my poor english...

@Adebisi01
Copy link

Adebisi01 commented Feb 6, 2023

$("#firstModal").modal('show');
$('#firstModal').on('hidden.bs.modal', function (e) {
$("#secondModal").modal('show');
})
$("#firstModal").modal('hide');

This worked for me for boostrap 5

@carlosridg
Copy link

If you are using the Bootstrap JavaScript library to handle modals, calling modal('show') immediately after modal('hide') may not work as expected. This is because the modal('hide') function triggers an event to hide the modal, which takes some time to complete. If you immediately call modal('show') right after modal('hide'), the show event may be triggered before the hide event is finished, resulting in unexpected behavior.

To ensure that the modal is shown after it has been fully hidden, you can use the modal's events and callbacks.

$('#myModal').on('hidden.bs.modal', function () {
  $('#myModal').modal('show');
});

By using the hidden.bs.modal event and its corresponding callback, you can ensure that the bootstrap modal is properly hidden before attempting to show it again, avoiding any conflicts or unexpected behavior.

tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 5, 2023
… changes (ref syncthing#9063)

Ensure that the previous modal has been fully hidden before proceeding
to saving changes. Without this, the "Saving Changes" modal will overlap
with the previous one, leading to additional padding being added to the
body every time.

Ref: twbs/bootstrap#3902 (comment)

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 6, 2023
… (ref syncthing#9063)

Opening and hiding multiple modals at the same time as well as opening a
modal before fully hiding the previous one can lead to the body padding
infinitely increasing by the scrollbar width each time, with the only
way to fix it being refreshing the GUI.

Therefore, always try to ensure to open and hide multiple modals one by
one, and also that the previous modal has fully been hidden before
proceeding to open the next one. The most common case when this problem
happens is when saving config changes which displays a GUI blocking
modal that overlaps, e.g. with folder or device modals that have not
been hidden yet.

Ref: twbs/bootstrap#3902 (comment)

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 6, 2023
… (ref syncthing#9063)

Opening and hiding multiple modals at the same time as well as opening a
modal before fully hiding the previous one can lead to the body padding
infinitely increasing by the scrollbar width each time, with the only
way to fix it being refreshing the GUI.

Therefore, always try to ensure to open and hide multiple modals one by
one, and also that the previous modal has fully been hidden before
proceeding to open the next one. The most common case when this problem
happens is when saving config changes which displays a GUI blocking
modal that overlaps, e.g. with folder or device modals that have not
been hidden yet.

Ref: twbs/bootstrap#3902 (comment)

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 6, 2023
… (ref syncthing#9063)

Opening and hiding multiple modals at the same time as well as opening a
modal before fully hiding the previous one can lead to the body padding
infinitely increasing by the scrollbar width each time, with the only
way to fix it being refreshing the GUI.

Therefore, always try to ensure to open and hide multiple modals one by
one, and also that the previous modal has fully been hidden before
proceeding to open the next one. The most common case when this problem
happens is when saving config changes which displays a GUI blocking
modal that overlaps, e.g. with folder or device modals that have not
been hidden yet.

Ref: twbs/bootstrap#3902 (comment)

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
calmh pushed a commit to syncthing/syncthing that referenced this issue Sep 25, 2023
… (ref #9063) (#9078)

Opening and hiding multiple modals at the same time as well as opening a
modal before fully hiding the previous one can lead to the body padding
infinitely increasing by the scrollbar width each time, with the only
way to fix it being refreshing the GUI.

Therefore, always try to ensure to open and hide multiple modals one by
one, and also that the previous modal has fully been hidden before
proceeding to open the next one. The most common case when this problem
happens is when saving config changes which displays a GUI blocking
modal that overlaps, e.g. with folder or device modals that have not
been hidden yet.

Ref: twbs/bootstrap#3902 (comment)

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
maxi0604 added a commit to maxi0604/syncthing that referenced this issue Oct 15, 2023
commit a405c21
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sat Oct 14 12:29:53 2023 +0200

    cmd/stdiscosrv: Only attempt unescaping when there are %-encodings in the header (fixes syncthing#9143)

commit dc6a10d
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Sep 20 08:52:33 2023 +0200

    cmd/stcrashreceiver: Aggregate slice out of bounds errors

commit d4c2acf
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Sep 20 08:39:01 2023 +0200

    cmd/stcrashreceiver: Propagate synthetic user ID for crashes

commit 483ecad
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sat Oct 14 12:18:27 2023 +0200

    build: Update dependencies

commit 9553365
Author: Eric P <eric@kastelo.net>
Date:   Wed Oct 11 14:40:55 2023 +0200

    lib/fs: Properly handle Windows deduplicated files (fixes syncthing#9120) (syncthing#9168)

    ### Purpose

    Deduplicated files are apparently considered 'irregular' under the hood,
    this causes them to simply be ignored by Syncthing. This change is more
    of a workaround than a proper fix, as the fix should probably happen in
    the underlying libraries? - which may take some time. In the meanwhile,
    this change should make deduplicated files be treated as regular files
    and be indexed and synced as they should.

    ### Testing

    Create some volume where deduplication is turned on (see the relevant
    issue for details, including a proper description of how to reproduce
    it). Prior to this change, the deduplicated files were simply ignored
    (even by the indexer). After this change, the deduplicated files are
    being index and synced properly.

commit 5eb2058
Author: orangekame3 <miya.org.0309@gmail.com>
Date:   Wed Oct 11 19:32:19 2023 +0900

    cmd/ursrv: Replace "2006-01-02" with time.DateOnly (syncthing#9157)

    This commit replaces "2006-01-02" to time.DateOnly. time.DateOnly is
    introduced since Go1.20

commit ea1ea36
Author: Emil Lundberg <emil@emlun.se>
Date:   Tue Oct 10 07:48:35 2023 +0200

    lib/api: Check basic auth (and set session cookie) before noauth exceptions (syncthing#9159)

    This is motivated by the Android app:
    syncthing/syncthing-android#1982 (comment)

    The planned fix in response to basic auth behaviour changing in syncthing#8757
    was to add the `Authorization` header when opening the WebView, but it
    turns out the function used only applies the header to the initial page
    load, not any subsequent script loads or AJAX calls. The
    `basicAuthAndSessionMiddleware` checks for no-auth exceptions before
    checking the `Authorization` header, so the header has no effect on the
    initial page load since the `/` path is a no-auth exception. Thus the
    Android app fails to log in when opening the WebView.

    This changes the order of checks in `basicAuthAndSessionMiddleware` so
    that the `Authorization` header is always checked if present, and a
    session cookie is set if it is valid. Only after that does the
    middleware fall back to checking for no-auth exceptions.

    `api_test.go` has been expanded with additional checks:
    - Check that a session cookie is set whenever correct basic auth is
    provided.
    - Check that a session cookie is not set when basic auth is incorrect.
    - Check that a session cookie is not set when authenticating with an API
    token (either via `X-Api-Key` or `Authorization: Bearer`).

    And an additional test case:
    - Check that requests to `/` always succeed, but receive a session
    cookie when correct basic auth is provided.

    I have manually verified that
    - The new assertions fail if the `createSession` call is removed in
    `basicAuthAndSessionMiddleware`.
    - The new test cases in e6e4df4 fail
    before the change in 0e47d37 is
    applied.

commit 6e4574a
Author: Syncthing Release Automation <release@syncthing.net>
Date:   Mon Oct 9 03:45:35 2023 +0000

    gui, man, authors: Update docs, translations, and contributors

commit 3d0da5a
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sat Oct 7 04:29:53 2023 +0200

    lib/api: Better handle %s templates in LDAP strings (fixes syncthing#9072) (syncthing#9155)

    Also add some escaping for good measure.

commit 9f8e696
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sat Oct 7 04:12:07 2023 +0200

    docker: Allow start even if chown fails (fixes syncthing#9133) (syncthing#9152)

commit a64ae36
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sat Oct 7 04:09:51 2023 +0200

    lib/model: Verify versioning on configuration reload (fixes syncthing#9106) (syncthing#9154)

commit 690b553
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sat Oct 7 04:09:07 2023 +0200

    cmd/stdiscosrv: Handle unescaped cert header from Traefik (fixes syncthing#9143) (syncthing#9153)

commit 2f6187d
Author: DeflateAwning <11021263+DeflateAwning@users.noreply.github.com>
Date:   Fri Oct 6 09:25:28 2023 -0600

    Add oxford comma (syncthing#9137)

    Co-authored-by: André Colomb <src@andre.colomb.de>

commit 8294870
Author: Emil Lundberg <emil@emlun.se>
Date:   Fri Oct 6 13:00:58 2023 +0200

    Add HTML login form (fixes syncthing#4137) (syncthing#8757)

commit ac2e444
Author: bt90 <btom1990@googlemail.com>
Date:   Fri Oct 6 12:27:13 2023 +0200

    gui: Fix favicon status (fixes syncthing#9149) (syncthing#9150)

commit 4f6b86a
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Oct 4 11:36:49 2023 +0200

    cmd/stdiscosrv: Slightly tweak replication settings

commit 516c057
Author: Jakob Borg <jakob@kastelo.net>
Date:   Tue Oct 3 10:00:16 2023 +0200

    build: Update deps

commit d644dce
Author: Jakob Borg <jakob@kastelo.net>
Date:   Tue Oct 3 09:33:52 2023 +0200

    build: Run release steps for workflow_dispatch as well

commit 7c57988
Author: bt90 <btom1990@googlemail.com>
Date:   Mon Oct 2 12:48:04 2023 +0200

    cmd/ursrv: Add linuxserver.io detection (syncthing#9145)

    Detect linuxserver

commit 296db31
Author: Jakob Borg <jakob@kastelo.net>
Date:   Mon Oct 2 08:40:03 2023 +0200

    lib/config: Improve parsing of gui-address overrides (syncthing#9144)

    improve parsing of gui-address overrides

    make checks for whether the gui-address is overridden consistent by
    checking whether the environment variable is set and not an empty
    string. the `Network()` function however checked for the inclusion of
    a slash instead of the presence of any characters. If the config file's
    gui address was set to a unix socket and the gui override to a tcp
    address, then the function would have wrongly returned "unix".

    the `URL()` function always returned the config file's gui address if a
    unix socket was configured, even if an override was specified.

    the `URL()` function wrongly formatted unix addresses. the http(s)
    protocol was used as the sheme and the path was percent escaped. because
    of the previous bug, this could only be triggered if the config file's
    gui address was tcp and an unix socket override was given.

    simplify the `useTLS()` function's codepath for overrides.

    Co-authored-by: digital <didev@dinid.net>

commit a8486b0
Author: Syncthing Release Automation <release@syncthing.net>
Date:   Mon Oct 2 03:45:41 2023 +0000

    gui, man, authors: Update docs, translations, and contributors

commit f8a7a03
Author: bt90 <btom1990@googlemail.com>
Date:   Fri Sep 29 17:42:44 2023 +0200

    cmd/ursrv: Fix f-droid detection (syncthing#9142)

    Fix f-droid detection

commit ceae56a
Author: bt90 <btom1990@googlemail.com>
Date:   Fri Sep 29 16:34:28 2023 +0200

    cmd/ursrv: Support new android build user (syncthing#9141)

    Support new android build user

commit dcafd6e
Author: DeflateAwning <11021263+DeflateAwning@users.noreply.github.com>
Date:   Thu Sep 28 03:55:48 2023 -0600

    readme: Style fixes, add security note (syncthing#9136)

commit 8619a03
Author: Jakob Borg <jakob@kastelo.net>
Date:   Mon Sep 25 21:50:17 2023 +0200

    build: Update Actions

commit b91d771
Author: Jakob Borg <jakob@kastelo.net>
Date:   Mon Sep 25 21:45:57 2023 +0200

    Update dependencies (syncthing#9129)

    And some QUIC API changes, of course.

commit 9940c91
Author: d-volution <49024624+d-volution@users.noreply.github.com>
Date:   Mon Sep 25 21:42:27 2023 +0200

    gui: Scroll to bottom by clicking message in log viewer (syncthing#9128)

commit 80a577b
Author: tomasz1986 <twilczynski@naver.com>
Date:   Mon Sep 25 21:34:19 2023 +0200

    gui: Show if device is untrusted in the main GUI (syncthing#9116)

    Add a new entry to the unfolded device info to inform the user that the
    device has been marked as "untrusted" and all folders shared with it
    have to be password-protected or already Receive Encrypted.

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit d672175
Author: tomasz1986 <twilczynski@naver.com>
Date:   Mon Sep 25 21:33:16 2023 +0200

    gui: Show if device has Auto Accept enabled in the main GUI (syncthing#9118)

    Add a new entry to the unfolded device info to inform the user that the
    device has Auto Accept enabled.

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit a44b31d
Author: tomasz1986 <twilczynski@naver.com>
Date:   Mon Sep 25 21:17:57 2023 +0200

    gui: Fix body padding infinitely increasing due to overlapping modals (ref syncthing#9063) (syncthing#9078)

    Opening and hiding multiple modals at the same time as well as opening a
    modal before fully hiding the previous one can lead to the body padding
    infinitely increasing by the scrollbar width each time, with the only
    way to fix it being refreshing the GUI.

    Therefore, always try to ensure to open and hide multiple modals one by
    one, and also that the previous modal has fully been hidden before
    proceeding to open the next one. The most common case when this problem
    happens is when saving config changes which displays a GUI blocking
    modal that overlaps, e.g. with folder or device modals that have not
    been hidden yet.

    Ref: twbs/bootstrap#3902 (comment)

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit 70065e6
Author: Martin Polehla <p0l0us@users.noreply.github.com>
Date:   Mon Sep 25 16:17:01 2023 +0200

    gitignore: All exe files, no editor configs (syncthing#9126)

commit adbb3ed
Author: Syncthing Release Automation <release@syncthing.net>
Date:   Mon Sep 25 03:45:38 2023 +0000

    gui, man, authors: Update docs, translations, and contributors

commit 6ed9c0c
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sun Sep 24 19:23:49 2023 +0200

    lib/config: Accept pre-hashed password (fixes syncthing#9123) (syncthing#9124)

commit 19bbf4f
Author: tomasz1986 <twilczynski@naver.com>
Date:   Fri Sep 22 07:39:16 2023 +0200

    gui: Add missing $scope in editDeviceUntrustedChanged function (syncthing#9117)

    Because $scope is missing, there are JavaScript errors when ticking and
    unticking the "Untrusted" checkbox in the Advanced tab of the Edit
    Device modal.

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit cf46bf0
Author: bt90 <btom1990@googlemail.com>
Date:   Wed Sep 20 11:23:48 2023 +0200

    lib/connections: Fix transport type detection for QUIC (fixes syncthing#8274) (syncthing#9114)

    Check remote address

commit 051cbdc
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Sep 20 09:04:47 2023 +0200

    lib/fs, lib/model: Be careful about potentially negative durations (fixes syncthing#9112) (syncthing#9113)

    I don't really understand under what circumstances, but sometimes these
    calls panic with a "panic: counter cannot decrease in value" because the
    value passed to Add() was negative.

commit 58d1f3a
Author: Syncthing Release Automation <release@syncthing.net>
Date:   Mon Sep 18 03:45:31 2023 +0000

    gui, man, authors: Update docs, translations, and contributors

commit c9dfd75
Author: tomasz1986 <twilczynski@naver.com>
Date:   Tue Sep 12 15:02:37 2023 +0200

    gui: Block GUI when saving changes only if necessary (ref syncthing#9063) (syncthing#9079)

    Currently, the UI is always blocked from modifications when changes are
    being saved, even if the save process takes very little time. This leads
    to a situation where showing and closing the blocking modal can take
    more time than is actually required to perform the whole operation. The
    modal opening and closing very quickly can also cause the screen to
    flash for a brief moment, leading to visual discomfort.

    Because of this, wait for at least 200 ms and only show the blocking
    modal if the changes have not been saved until then yet. The value of
    200 ms is loosely based on [1] which states that 'a delay of 0.2–1.0
    seconds does mean that users notice the delay and thus feel the computer
    is "working" on the command, as opposed to having the command be a
    direct effect of the users' actions.' Additionally, the delay must not
    be too long, because the main purpose of the blocking modal is to
    prevent the user from making further changes, and a longer delay would
    possibly allow to do so in that brief amount of time as long as the user
    is quick enough with their input.

    [1] https://nngroup.com/articles/response-times-3-important-limits

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit f47de83
Author: Jakob Borg <jakob@kastelo.net>
Date:   Tue Sep 12 14:48:15 2023 +0200

    lib/protocol: Ensure starting & closing a connection are exclusive (fixes syncthing#9102) (syncthing#9103)

    In principle a connection can close while it's in progress with
    starting, and then it's undefined if we wait for goroutines to exit etc.
    With this change, we will wait for start to complete before starting to
    stop everything.

commit caedb19
Author: tomasz1986 <twilczynski@naver.com>
Date:   Tue Sep 12 14:47:31 2023 +0200

    gui: Remove unused hard-coded styles from Recent Changes modal (syncthing#9101)

    gui: Remove unused hard-coded styles from globalChangesModalView modal

    Currently, the globalChangesModalView modal has hardcoded th and td
    styles. However, they are not even used in the modal itself, because
    Bootstrap overrides them with its own styles for these elements in the
    same modal. Yet, when hard-coded like that, these styles can conflict
    with other table elements in the GUI. Thus, remove them completely.

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit e860d3b
Author: bt90 <btom1990@googlemail.com>
Date:   Tue Sep 12 14:34:30 2023 +0200

    lib/connections: Make assumptions about isLAN when interface address listing fails (syncthing#9093)

commit ed66fba
Author: bt90 <btom1990@googlemail.com>
Date:   Tue Sep 12 14:28:17 2023 +0200

    lib/beacon, lib/discover: Send IPv4 limited broadcast when address listing fails (fixes syncthing#1628) (syncthing#9087)

commit 415f320
Author: Jakob Borg <jakob@kastelo.net>
Date:   Tue Sep 12 14:08:59 2023 +0200

    build: Update dependencies

commit 4812600
Author: Jakob Borg <jakob@kastelo.net>
Date:   Mon Sep 11 23:10:18 2023 +0200

    lib/versioner: Don't complain when folder is stopping (syncthing#9097)

commit 5ff11ce
Author: Jakob Borg <jakob@kastelo.net>
Date:   Mon Sep 11 14:59:48 2023 +0200

    gui: Add help link for numConnections (syncthing#9082)

commit 5415727
Author: tomasz1986 <twilczynski@naver.com>
Date:   Mon Sep 11 05:50:23 2023 +0200

    gui: Add missing translation related to Number of Connections (ref syncthing#8918) (syncthing#9095)

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit e38679d
Author: Syncthing Release Automation <release@syncthing.net>
Date:   Mon Sep 11 03:45:45 2023 +0000

    gui, man, authors: Update docs, translations, and contributors

commit f25a169
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Sep 6 21:10:58 2023 +0200

    build: Go 1.21.1 or higher

commit 06ac10e
Author: bt90 <btom1990@googlemail.com>
Date:   Wed Sep 6 14:36:00 2023 +0200

    cmd/stdiscosrv: Deduplicate addresses (fixes syncthing#8482) (syncthing#9080)

commit 7c0223b
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Sep 6 13:11:20 2023 +0200

    lib/build: Next version is the Gold Grasshopper

commit c6334e6
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Sep 6 12:52:01 2023 +0200

    all: Support multiple device connections (fixes syncthing#141) (syncthing#8918)

    This adds the ability to have multiple concurrent connections to a single device. This is primarily useful when the network has multiple physical links for aggregated bandwidth. A single connection will never see a higher rate than a single link can give, but multiple connections are load-balanced over multiple links.

    It is also incidentally useful for older multi-core CPUs, where bandwidth could be limited by the TLS performance of a single CPU core -- using multiple connections achieves concurrency in the required crypto calculations...

    Co-authored-by: Simon Frei <freisim93@gmail.com>
    Co-authored-by: tomasz1986 <twilczynski@naver.com>
    Co-authored-by: bt90 <btom1990@googlemail.com>

commit 38bbdeb
Author: Jakob Borg <jakob@kastelo.net>
Date:   Tue Sep 5 09:52:19 2023 +0200

    build: Use actions/checkout@v4

commit e80d048
Author: Jakob Borg <jakob@kastelo.net>
Date:   Tue Sep 5 09:47:51 2023 +0200

    build: Minor dependency update

commit 4138e22
Author: Syncthing Release Automation <release@syncthing.net>
Date:   Mon Sep 4 03:45:39 2023 +0000

    gui, man, authors: Update docs, translations, and contributors

commit c42c0e7
Author: Maximilian <maxi.rostock@outlook.de>
Date:   Sun Sep 3 17:03:27 2023 +0200

    lib/connections: Fix WANAddresses returning only unspecified IPs (ref syncthing#9010) (syncthing#9073)

    Avoids taking the address of the same variable twice.

commit 5118538
Author: Jakob Borg <jakob@kastelo.net>
Date:   Sat Sep 2 16:42:46 2023 +0200

    lib/model: Refactor folderRunners to use a serviceMap (syncthing#9071)

    Instead of separately tracking the token.

    Also changes serviceMap to have a channel version of RemoveAndWait, so
    that it's possible to do the removal under a lock but wait outside of
    the lock. And changed where we do that in connection close, reversing
    the change that happened when I added the serviceMap in 40b3b9a.

commit 4d93648
Author: tomasz1986 <twilczynski@naver.com>
Date:   Sat Sep 2 12:19:18 2023 +0200

    gui: Don't hide default values for folders and devices (syncthing#8987)

    Currently, some of the information for folders and devices displayed in
    the GUI relies on arbitrary values that come pre-set as defaults on a
    fresh Syncthing installation, i.e. if the value matches the default, it
    is hidden, and if does not, then it is displayed.

    With this change, the GUI always displays all information regardless
    of their value, making the overall experience more consistent and
    predictable.

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit 29f100c
Author: tomasz1986 <twilczynski@naver.com>
Date:   Fri Sep 1 11:15:20 2023 +0200

    gui: Fix File Versioning icon to match in all places (syncthing#9070)

    Currently, different icons are used for File Versioning when displayed
    in the unfolded folder info in the main part of the GUI, and the icon
    used in the Edit Folder modal. This changes the main GUI icon to match
    the icon used in the modal.

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit cd98a43
Author: tomasz1986 <twilczynski@naver.com>
Date:   Fri Sep 1 11:14:28 2023 +0200

    gui: Fix Logs modal icon to match header icon (ref syncthing#9067) (syncthing#9069)

    The Logs icon was changed in [1] in the header, however the icon used in
    the modal was left out. This changes it, so that the header and the
    modal icons match.

    [1] 2abba1d

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit 4bf9823
Author: Jakob Borg <jakob@kastelo.net>
Date:   Fri Sep 1 08:35:30 2023 +0200

    build: Be more subtle about cross compilation errors

    Summarize platforms that fail to build, without overloading the build
    log with errors that we anyway ignore. (Currently freebsd/riscv64 fails
    to build.)

commit 29056d5
Author: Jakob Borg <jakob@kastelo.net>
Date:   Fri Sep 1 08:39:15 2023 +0200

    build: Update dependencies (syncthing#9068)

commit 2abba1d
Author: tomasz1986 <twilczynski@naver.com>
Date:   Fri Sep 1 08:18:30 2023 +0200

    gui: Remove footer and move links to header (fixes syncthing#5607) (syncthing#9067)

    * gui: Remove footer and move links to header (fixes syncthing#5607)

    Currently, the footer is always present and takes space at the bottom of
    the GUI. However, the links listed there are not part of everyday user
    interaction, and as such, they unnecessarily clutter the page, reducing
    the usable screen space. Thus, transform the current Help link in the
    header into a Help dropdown menu, and move the links from the footer
    into it.

    Also apply the following tweaks:

    1. Move the About dialog from Actions to Help.
    2. Add an Introduction (to the GUI) link to Help.
    3. Change the Support icon from a question mark to a group of people.
    4. Change the Changelog and About icons to a filled version to match the
       other icons better.
    5. Use a source code icon for Source Code instead of a wrench icon, and
       move the wrench icon to Logs. This is done to prevent Changelog and
       Logs from using the same icon.
    6. Update all dropdown icons' Fork Awesome styles to "fa fa-fw <icon>".

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

    * a few more Fork Awesome style updates

    ---------

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit 325b3b1
Author: tomasz1986 <twilczynski@naver.com>
Date:   Fri Sep 1 07:22:04 2023 +0200

    gui: Fix lastSeenDays error due to undefined deviceStats when adding new devices (ref syncthing#8730) (syncthing#9066)

commit 03590e5
Author: tomasz1986 <twilczynski@naver.com>
Date:   Thu Aug 31 22:16:59 2023 +0200

    gui: Automatically select device ID on click (ref syncthing#8544) (syncthing#9065)

    The CSS method to select device IDs on click was added in [1]. However,
    it was later mistakenly overwritten by [2]. This commit fixes the
    regression and also applies the same behaviour to the Edit Device modal
    which was omitted in the original commit.

    [1] 5baf5fe
    [2] 5e384c9

    Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>

commit 95b3c26
Author: tomasz1986 <twilczynski@naver.com>
Date:   Thu Aug 31 17:11:03 2023 +0200

    gui: Prevent modifications when saving changes (fixes syncthing#9019) (syncthing#9063)

commit 3e5f0b1
Author: tomasz1986 <twilczynski@naver.com>
Date:   Thu Aug 31 07:22:24 2023 +0200

    gui: Show in GUI if limitBandwidthInLan is enabled (syncthing#9062)

commit 3130af3
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Aug 30 21:58:34 2023 +0200

    lib/upgrade: Enable HTTP/2 for upgrade checks (syncthing#9060)

commit abd89f1
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Aug 30 21:58:05 2023 +0200

    lib/discover: Enable HTTP/2 for global discovery requests (syncthing#9059)

    By creating the http.Transport and tls.Configuration ourselves we
    override some default behavior and end up with a client that speaks only
    HTTP/1.1.

    This adds a call to http.ConfigureTransport to do the relevant magic to
    enable HTTP/2.

    Also tweaks the keepalive settings to be a little kinder to the
    server(s).

commit a80e6be
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Aug 30 09:36:27 2023 +0200

    cmd/stdiscosrv: Streamline context handling

commit acc532f
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Aug 30 09:09:50 2023 +0200

    cmd/stdiscosrv: Explicitly enable HTTP/2

    The server supports it, but it's not negotiated unless explicitly
    allowed in the TLS config NextProtos.

commit 3cc3fb7
Author: Syncthing Release Automation <release@syncthing.net>
Date:   Mon Aug 28 03:45:57 2023 +0000

    gui, man, authors: Update docs, translations, and contributors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests