Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

auto blur button on click, btn-default disabled and focus shows spinn… #53

Closed
wants to merge 1 commit into from

Conversation

lookbadgers
Copy link

…er white on white background, blur allows background to change colour and spinner to appear as white on grey

…er white on white background, blur allows background to change colour and spinner to appear as white on grey
@lookbadgers
Copy link
Author

If a button has btn-default the spinners does not show up if the spinner is triggered on click. The spinner shows as white on white.

This fix means when ever a spinner starts, the button is blurred. Therefore avoiding the spinner not showing up for btn-default.

The alternative solution would be to manually call blur() before every ladda('start'). If a button is disabled it does not make sense for it to have focus, therefore it seems better that ladda manages this as well.

        <button type="button" class="btn btn-default ladda-button" data-style="zoom-in">
            <span class="ladda-label">
                <span class="glyphicon glyphicon-pencil"></span>
            </span>
        </button>

@terales
Copy link
Contributor

terales commented Dec 13, 2017

Problem reproduced in JSFiddle: https://jsfiddle.net/terales/5v2v0mgL/1/

But I don't see how proposed fix helps, see JSFiddle with ladda.js from lookbadgers/ladda-bootstrap: https://jsfiddle.net/terales/5v2v0mgL/2/

@lookbadgers can you update JSFiddle to reproduce a solution, please?

@terales
Copy link
Contributor

terales commented Jan 2, 2018

@msurguy I think this PR could be closed in favor of #65 (comment): use data-spinner-color attribute to change color of btn-default

@msurguy msurguy closed this Jan 2, 2018
@msurguy
Copy link
Owner

msurguy commented Jan 2, 2018

@terales thanks! That makes it easy to find if somebody's looking!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants