angular-xeditable icon indicating copy to clipboard operation
angular-xeditable copied to clipboard

ReferenceError: onshow_callback is not defined in Firefox

Open sinall opened this issue 6 years ago • 12 comments

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

sinall avatar Jul 14 '18 10:07 sinall

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 avatar Jul 16 '18 21:07 ckosloski

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

sinall avatar Jul 17 '18 03:07 sinall

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

ckosloski avatar Jul 17 '18 19:07 ckosloski

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

ckosloski avatar Jul 31 '18 12:07 ckosloski

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

sinall avatar Aug 01 '18 04:08 sinall

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

ckosloski avatar Aug 01 '18 20:08 ckosloski

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.

sinall avatar Aug 05 '18 06:08 sinall

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

ckosloski avatar Aug 20 '18 21:08 ckosloski

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

sinall avatar Aug 21 '18 02:08 sinall

Sorry, I pasted the wrong link. Try this one

ckosloski avatar Aug 21 '18 13:08 ckosloski

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

sinall avatar Aug 29 '18 16:08 sinall

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.

ckosloski avatar Aug 29 '18 16:08 ckosloski