Skip to main content
Inspiring
October 21, 2014
Answered

Questions regarding CEP 5.2

  • October 21, 2014
  • 2 replies
  • 1122 views

1) I used to trap keydown events to create some shortcuts using javascript. Now all keydown events are directly passed to indesign. Is there any work around to get that back?

2) If you now drag an indesign element, say textbox, the extension ui is replaced the the xml export of that element. How to disable that?

This topic has been closed for replies.
Correct answer lesavage

Hi maddy1907,

Unfortunately there is no way to be notified when the flyout menu is clicked. You are only notified when one of the menu items has been selected.

In terms of your 2nd question in your initial post. Could you elaborate on what you would like to see and what you are currently seeing? I don't fully understand the question.

Thanks in advance,

Lea

2 replies

maddy1907Author
Inspiring
November 18, 2014

Thanks for the reply lesavageake a text frame. Drag it to an extension. It's UI will be replace by the XML of the text frame. I wanted to avoid that. Is that possible?

lesavage
Community Manager
Community Manager
November 18, 2014

I now understand. So you need to disable D&D in your HTML. Below are two recommended methods:

Add the following in the body:

<body ondragover="return false" ondrop="return false">

Or using JS, e.g. using JQuery:

$(document.body).on('dragover drop', function(e) {

  e.preventDefault();

});

maddy1907Author
Inspiring
November 18, 2014

Thank you so much. Appreciate the quick reply. Regarding the event issue, is it advisable to file a feature request? Or is Adobe already working on that?

maddy1907Author
Inspiring
November 10, 2014

I got the answer to my first question that it's indeed a bug and Adobe is working on it, but haven't seen anything on the second one. Isn't anybody else facing this issue?

Also, there's another issue

"Is there a way to detect flyout menu button click before it is displayed. Depending on the current selection in my extension, I’d like to determine what my flyout menu shows, that is render it on runtime. This could be done by simply modifying the flyout options by catching every click but I’d like to go for the lazy approach, catch click event and then modify the xml."

lesavage
Community Manager
lesavageCommunity ManagerCorrect answer
Community Manager
November 14, 2014

Hi maddy1907,

Unfortunately there is no way to be notified when the flyout menu is clicked. You are only notified when one of the menu items has been selected.

In terms of your 2nd question in your initial post. Could you elaborate on what you would like to see and what you are currently seeing? I don't fully understand the question.

Thanks in advance,

Lea