5

I think my problem lies with the drop down button in "display." In Chrome, the drop down works as expected - i.e. shows a list of option names in the ng-repeat list. However, in Firefox, clicking the drop down disables the text-angular menu, as if the user has clicked outside the text angular editor (at which point text angular disables the editor options). Nothing drops down either.

The + line breaks all work fine too in Chrome. We just try to keep the code readable for those who don't use huge screens. For those unfamiliar with text-angular: All the relevant code is in display - it's just some html that defines a dropdown, and I think that's where the issue lies. How can I get this to work in FireFox?

    taRegisterTool('itemFields', {
        display: '<span class="btn-group" dropdown style="padding: 0px 0px 0px 0px">' +
        '<button class="btn btn-default dropdown-toggle" dropdown-toggle type="button" ng-disabled="showHtml()">' +
        '   <span>Item Fields</span>' +
        '</button>' +
        '<ul class="dropdown-menu">' +
        '   <li ng-repeat="o in options">' +
        '       <a ng-click="action(o)">{{o.name}}</a>' +
        '   </li>' +
        '</ul>' +
        '</span>',
        options: ReportItemFields,
        action: function (option) {
            if( angular.isDefined(option) && angular.isUndefined(option.promise))
            {
                this.$editor().wrapSelection('insertHTML', option.text);
            }
        }
    });
08Dc91wk
  • 4,254
  • 8
  • 34
  • 67
VSO
  • 11,546
  • 25
  • 99
  • 187

1 Answers1

0

Try putting your ng-click="action(o)" on the li element instead. Kind of like this:

    '<ul class="dropdown-menu">' +
    '   <li ng-repeat="o in options" ng-click="action(o)">{{o.name}>' +
    '       {{o.name}}' +
    '   </li>' +
    '</ul>' +
theJoi
  • 403
  • 5
  • 10