themesberg / neumorphism-ui-bootstrap

Neumorphism inspired UI Kit: web components, sections and pages in neumorphic style built with Bootstrap CSS Framework
https://themesberg.com/docs/neumorphism-ui/getting-started/quick-start/
MIT License
843 stars 130 forks source link

On MacOS, using Chrome, buttons stay depressed until I click away #29

Open youngsoul opened 2 years ago

youngsoul commented 2 years ago

MacOS 10.15.7 Chrome ( latest ) if you go to your page:

https://demo.themesberg.com/neumorphism-ui/html/components/buttons.html

And press one of the 'Main Buttons' on chrome the button stays depressed until I click somewhere on the page. In Safari this does not happen. In Safari as soon as I navigate out of the button it returns to the normal state.

obanach commented 2 years ago

Just add

$(".btn").mouseup(function(){ $(this).blur(); })

youngsoul commented 2 years ago

I am sorry I am just now getting back to this. Thank you for your response. I am not very good with css/javascript, so when you suggest, 'just add' - where do I add this?

Thanks again

Rixef commented 11 months ago

I am sorry I am just now getting back to this. Thank you for your response. I am not very good with css/javascript, so when you suggest, 'just add' - where do I add this?

Thanks again

I know this is like a year old now but figured it'll be good to answer for anyone else that comes across it; you can add that almost anywhere in either a *.js file that runs with your page or just directly to whatever html page you want the buttons to act that way. To do so, simply add a script tag like so somewhere to the html page(page scripts are typically either put in the \ tag of the page or somewhere towards the end after the \ tag):

<script>
$(".btn").mouseup(function(){ $(this).blur(); })
</script>