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

.or method doesn't work properly in Firefox #39

Closed
dzschille opened this issue Mar 10, 2017 · 8 comments
Closed

.or method doesn't work properly in Firefox #39

dzschille opened this issue Mar 10, 2017 · 8 comments

Comments

@dzschille
Copy link

I have this mini site:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="./dependsOn.min.js"></script>
</head>
<body>
    <div class="field field-numbers">
        <label>Number</label>
        <select name="numbers">
            <option>One</option>        
            <option>Two</option>
            <option>Three</option>
        </select>
    </div>
    <div class="field field-chars">
        <label>Char</label>
        <select name="chars">
            <option>A</option>        
            <option class="depend-B">B</option>
            <option>C</option>       
            <option>D</option>
        </select>
    </div>
<script>
$(function() {
        $('.depend-B').dependsOn({
                '.field-numbers  select': {
                    values: ['One']
                }
        }).or({
                '.field-numbers select': {
                    values: ['Two']
                }                     
        });
});
</script>
</body>
</html>

When i choose number "Two", the char "B" gets hidden in the chars select list. That happens in Firefox 52. "B" is correctly still there in Google Chrome 54 and Opera 43.

When i change the JS to

$('.depend-B').dependsOn({
        '.field-numbers  select': {
            values: ['One','Two']
        }
});

it works also in Firefox.

@dstreet
Copy link
Owner

dstreet commented Mar 10, 2017

Thanks. I'll take a look

@dzschille
Copy link
Author

Hi @dstreet, is it possible to pay you for the fix, so that this bugs gets a higher priority and will be resolved soon?

@dstreet
Copy link
Owner

dstreet commented Mar 30, 2017

@dzschille, You are always welcome to donate to the project. That being said, I will be investigating this issue tonight.

@dzschille
Copy link
Author

Great, thanks!

@dstreet
Copy link
Owner

dstreet commented Mar 31, 2017

@dzschille I'll be pushing a fix for this soon, but a workaround is to add the option { duration: 0 }

dstreet added a commit that referenced this issue Mar 31, 2017
@dstreet
Copy link
Owner

dstreet commented Mar 31, 2017

This fix is now in version 1.5.1

@dzschille
Copy link
Author

Fix works, thanks!
You should have gotten some tip yesterday.

@dstreet
Copy link
Owner

dstreet commented Apr 4, 2017

Thanks for the donation, @dzschille. I'm glad the fix worked.

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

No branches or pull requests

2 participants