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

VM2: drop-downs ('select' elements) do not work in Firefox + Edge (but in Chrome) #164

Closed
buehren opened this issue Jan 22, 2016 · 2 comments

Comments

@buehren
Copy link

buehren commented Jan 22, 2016

I find viewmodel very helpful and have recently gone through the pain of updating to Version 2 (updated to latest versions, detailed version numbers below).

But unfortunately it is giving me another headache that I cannot solve: drop-downs and lists ('select' elements) work in Chrome but do not work in Firefox and Edge (have not tried more browsers).

Problem: The viewmodel property given in {{b value: property}} does not update when selecting an item from the list.

As I am currently developing an App with a lot of select elements and have made use of some features of VM2, this error is a very big problem for me as the way back to Version 1 would mean a lot of work. I hope you can find a fix soon...

This little demo shows the problem (source code below) in Firefox + Edge (and maybe other browsers):
http://viewmodel2-select-broken.meteor.com/

You can even see the problem in the examples at https://viewmodel.meteor.com/docs/bindings#options ("BROKEN" means "broken in Firefox + Edge"):

BROKEN: options - String Array - Single Selection
WORKS: options - String Array - Multiple Selection
BROKEN: options - Object Array - Single Selection
BROKEN: options - Dropdown
BROKEN: options - Dropdown - Manual Loop

Code of my broken demo:

<body>
  {{> selectTest}}
</body>

<template name="selectTest">
    Selecting an item here does not update "selectedItem" in Firefox + Edge:<br/>
    <select {{b "options: items, optionsText: t, optionsValue: v, value: selectedItem" }}></select><br/>
    <br/>
    Editing here changes "selectedItem":<br/>
    <input {{b "value: selectedItem"}} type="text"><br/>
    <br/>
    selectedItem:<div {{b "text: selectedItem"}} ></div><br/>
</template>
if (Meteor.isClient) {
    Template.selectTest.viewmodel({
        selectedItem: 0,
        items: function() {
           return [ { v: 1, t: "one"}, { v: 2, t: "two"}, { v: 3, t: "three"} ];
        }
    });
}

Versions I am using:

coffeescript@1.0.11
manuel:isdev@1.0.0
manuel:reactivearray@1.0.5
manuel:viewmodel@2.9.3
manuel:viewmodel-debug@2.6.0
sha@1.0.4

(I have posted this in ViewModel Board before finding this github issues page: http://viewmodelboard.meteor.com/posts/cFyjqgBwXFQQY48ti/vm2-drop-downs-select-elements-do-not-work-in-firefox-edge )

@buehren buehren changed the title Upvote VM2: drop-downs ('select' elements) do not work in Firefox + Edge (but in Chrome) VM2: drop-downs ('select' elements) do not work in Firefox + Edge (but in Chrome) Jan 22, 2016
@ManuelDeLeon
Copy link
Owner

Pick up 2.10.1-beta and let me know how it goes

@buehren
Copy link
Author

buehren commented Jan 23, 2016

‎Hi Manuel,

thank you very very much! It seems to work again! I have tried everything in my App and did not find any problem in Firefox / Edge.

Thomas

Gesendet von meinem BlackBerry 10-Smartphone.
Von: ManuelDeLeon
Gesendet: Freitag, 22. Januar 2016 23:19
An: ManuelDeLeon/viewmodel
Antwort an: ManuelDeLeon/viewmodel
Cc: buehren
Betreff: Re: [viewmodel] VM2: drop-downs ('select' elements) do not work in Firefox + Edge (but in Chrome) (#164)

Pick up 2.10.1-beta and let me know how it goes


Reply to this email directly or view it on GitHubhttps://github.com//issues/164#issuecomment-174071334.

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