I want to be able to detect dragging and dropping an element inside TinyEditor. When I say inside the editor, I mean only inside, like repositioning an image inside the editor to a new location still inside the editor.
I tried this code:
editor.on('dragend', function (e) {
alert('dragged');
});
but it doesn't fire when dropping the dragged element to a new position in the editor, it only fires when the element gets dropped outside the editor.
Related
I have got a simple NSTextView inside a NSPopover. Most often selection and text editing works as suggested; i.e. i-beam cursor and current selection deselects when I click somewhere else inside the selection.
However, sometimes when the NSPopover is toggled the cursor is replaced with a pointer cursor and the selection won't disappear on click. While in this state the text is also draggable.
I want my NSTextView to behave just like in TextEdit and similar apps; the selection should never be draggable and should deselect on a single click. The cursor should also stay as i-beam.
How can I accomplish this behavior?
current and expected behavior, illustrated
I have a TinyMCE editor embedded in a page in which the outer element has an ondrop handler that uploads dropped files.
However, if the user drops a file on the TinyMCE editor, the parent handler is never called. Regardless of whether I enable or disable drag-drop in the editor, the event never propagates to the parent element.
Is there a way to propagate an ondrop event from the TinyMCE editor to the surrounding element?
The editor itself is an iFrame so if you want to propagate the event you need to make sure you are passing it to the parent if you want the page to get the event.
Perhaps you can make a TinyMCE Fiddle or CodePen of what you are doing so people can see what you have tried?
I have created new UI button in empty scene,
Whenever I click on button its not click-able , but when I take cursor slightly above the button area and click, it gets clicked.
I guess Something like offset problem occurring?? Any fix to that?
NOTE I have tried creating new scene same result
,also created new project though Same result.
Did you check the EventSystem gameObject, it displays which UI element you are hovering, and other useful information.
After lot of trial and errors, reinstalling Unity did the job
We have a custom input element that contains several div elements that are masked behind a canvas element. The div elements handle click events, and this works fine in all browsers.
How can we click such an element in Watir-Webdriver? If we locate the div element and use the .click method, it causes the error:
Element is not clickable at point (423, 247). Other element would receive the click: <canvas></canvas>
Which of course it would, before event bubbling. What we want to do is to click the location where the div element is (which first clicks the canvas, and then bubbles to the div).
We wouldn't want to fire JavaScript events directly to the div, as it does not correctly test the event bubbling.
You could, of course, just click the canvas element just like you clicked the div. But to answer the question you raised: you can try to access the underlying selenium-webdriver browser driver and utilize selenium-webdriver methods to do this.
driver = $browser.driver
element = driver.find_element(css:'div.class_name')
driver.action.move_to(element).click.perform
I have an editor which is comprised of a table and a set of selection-specific form fields below it, so that when I make a selection in the table, the fields below it will change. When the editor is sized too small, the fields container gets a scrollbar:
The problem is that when I make a selection in the table, I can't scroll the fields container down (with the mouse wheel) because the focus is still within the table. Currently I have to select one of the fields to be able to scroll its container or manually drag the scrollbar itself, but it's much easier to just click or hover anywhere in the target container to focus it for mouse wheel scrolling.
How can I make the composite body (in my case, a Form) selectable? Or even better, is there a way to control scrolling depending on where the mouse cursor is?
If you want to control scrolling based on where the mouse cursor is located, you're going to have to write a combination org.eclipse.swt.events.MouseMoveListener and org.eclipse.swt.events.MouseWheelListener.
Component method setFocus() brings the component into keyboard focus.
I've not tried to do this. Be sure to handle the case where the user does not have a scroll wheel on their mouse.