Skip to content

How add paste event support to magicsuggest? #352

@michaellux

Description

@michaellux

I want to add support for the paste event in magicsuggest.

I added this code to magicsuggest.js:

ms.container.on('paste', $.proxy(handlers._onPaste, this));
...

_onPaste: function (e) {
                ms.expandForPasteEvent();
             },

...

 this.expandForPasteEvent = function () {
            if (!cfg.expanded) {
                this.combobox.appendTo(this.container);
                self._processSuggestions();
                cfg.expanded = true;
                $(this).trigger('expand', [this]);
            }
          };

But it doesn't work in every case. Maybe there's an easier way to do it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions