angular-xeditable
angular-xeditable copied to clipboard
ReferenceError: onshow_callback is not defined in Firefox
Steps to reproduce the issue in Firefox.
- Add onshow="onshow_callback" attribute on form element
- Add dropdown-menu in form
- Click Edit button, everything is OK, the callback is triggered correctly.
- Click dropdown-menu, it doesn't show. Console shows: ReferenceError: onshow_callback is not defined
This is a strange one. It works in chrome/safari but not Firefox. I tried a bunch of things, but couldn't get it to work in Firefox. It's as if bootstrap/jquery is hijacking the click event meant for xeditable, or maybe xeditable is handling it, but it then falls through to bootstrap/jquery.
@ckosloski it could work if the dropdown-menu is created by angular-bootstrap library.
I can see if I can get something added in the next couple of weeks. Or, your welcome to create a PR yourself :)
@sinall how do you plan to use the dropdown-menu in an editable form?
@ckosloski I use it to refresh the select list and view/create new item. The 'select' and dropdown-menu stay in a row.
@sinall so the inputs are linked? An item is selected in the dropdown-menu and this populates the select with values? Then a value is in the chosen in the select and the form submitted?
The inputs are editable-select, a dropdown menu is next to it. The items in the select could be viewed/created/refreshed by choosing one of the dropdown menu item.
Maybe two editable-select's with e-ng-change
would work for you?
I updated the jsFiddle from #521 here
Doesn't work on firefox, did you change the code? I can not find 'e-ng-change
'.
Sorry, I pasted the wrong link. Try this one
I tried several times. But it doesn't display correct.
It shows like this:
Brand: Ford
Model: havent selected
car { "brand": "Ford", "model": "havent selected" }
brands [ { "value": "Ford", "text": "Ford" }, { "value": "Toyota", "text": "Toyota" }, { "value": "Nissan", "text": "Nissan" } ]
models{ "Ford": [ "Focus", "Fiesta" ], "Toyota": [ "Camry" ], "Nissan": [ "Siesta", "Sentra" ] }
OK, so it seems there is an issue with the value being initially set.. If you select Toyota, then select Model, it only shows Camry.