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

ReferenceError: onshow_callback is not defined in Firefox #735

Open
sinall opened this issue Jul 14, 2018 · 12 comments
Open

ReferenceError: onshow_callback is not defined in Firefox #735

sinall opened this issue Jul 14, 2018 · 12 comments

Comments

@sinall
Copy link

sinall commented Jul 14, 2018

Steps to reproduce the issue in Firefox.

  1. Add onshow="onshow_callback" attribute on form element
  2. Add dropdown-menu in form
  3. Click Edit button, everything is OK, the callback is triggered correctly.
  4. Click dropdown-menu, it doesn't show. Console shows: ReferenceError: onshow_callback is not defined

jsfiddle example

@ckosloski
Copy link
Contributor

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.

@sinall
Copy link
Author

sinall commented Jul 17, 2018

@ckosloski it could work if the dropdown-menu is created by angular-bootstrap library.

@ckosloski
Copy link
Contributor

I can see if I can get something added in the next couple of weeks.
Or, your welcome to create a PR yourself :)

@ckosloski
Copy link
Contributor

@sinall how do you plan to use the dropdown-menu in an editable form?

@sinall
Copy link
Author

sinall commented Aug 1, 2018

@ckosloski I use it to refresh the select list and view/create new item.
The 'select' and dropdown-menu stay in a row.

@ckosloski
Copy link
Contributor

@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?

@sinall
Copy link
Author

sinall commented Aug 5, 2018

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.

@ckosloski
Copy link
Contributor

ckosloski commented Aug 20, 2018

Maybe two editable-select's with e-ng-change would work for you?
I updated the jsFiddle from #521 here

@sinall
Copy link
Author

sinall commented Aug 21, 2018

Doesn't work on firefox, did you change the code? I can not find 'e-ng-change'.

@ckosloski
Copy link
Contributor

Sorry, I pasted the wrong link.
Try this one

@sinall
Copy link
Author

sinall commented Aug 29, 2018

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" ] }

@ckosloski
Copy link
Contributor

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.

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