Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Oxygen general issues.
-
- Posts: 51
- Joined: Mon Oct 01, 2012 3:05 pm
Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Hi
I have a problem with DnD from internal Eclipse Internet Explorer into the Oxygen Author. The dragged information is a TextTransfer from an HTML5 Draggable tag.
The Editor loggs following Error:
10794068 ERROR [ main ] ro.sync.ecss.strictediting.r - Problem during paste of document fragment, both fragment and text content are null
When I try to drag into an external Editor lite NotePad++ everything is fine.
What exactly is trying to do this class "r" on this point?
This Error seems to avoid the ExtensionBundle to call the getAuthorSchemaAwareEditingHandler() method.
Regards
Stefan
I have a problem with DnD from internal Eclipse Internet Explorer into the Oxygen Author. The dragged information is a TextTransfer from an HTML5 Draggable tag.
The Editor loggs following Error:
10794068 ERROR [ main ] ro.sync.ecss.strictediting.r - Problem during paste of document fragment, both fragment and text content are null
When I try to drag into an external Editor lite NotePad++ everything is fine.
What exactly is trying to do this class "r" on this point?
This Error seems to avoid the ExtensionBundle to call the getAuthorSchemaAwareEditingHandler() method.
Regards
Stefan
Stefan Nöbauer
Senior Solution Architect
KGU-Consulting GmbH
Senior Solution Architect
KGU-Consulting GmbH
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Hi Stefan,
I tried to reproduce this on my side by opening in Eclipse both an HTML page in the internal IE and a DITA topic and trying to drag content between the IE page and the DITA topic but the drag was not accepted, it's not even accepted when dragging to Notepad. I'm also not sure what you mean by HTML5 draggable tab, there is a "draggable" attribute which I tried to use without any success, but I think that any HTML element is draggable by default.
So if you have a sample HTML document for me to work with, it would help me investigate this further.
Anyway the current code we have to look at the dropped content is something like this:
In your case it means that probably the "TextTransfer.getInstance().isSupportedType(dataType)" returns "true" but the event.data is null.
Maybe if we also looked at the "HTMLTransfer" in such cases, but I would need to reproduce the issue on my side first...
Regards,
Radu
I tried to reproduce this on my side by opening in Eclipse both an HTML page in the internal IE and a DITA topic and trying to drag content between the IE page and the DITA topic but the drag was not accepted, it's not even accepted when dragging to Notepad. I'm also not sure what you mean by HTML5 draggable tab, there is a "draggable" attribute which I tried to use without any success, but I think that any HTML element is draggable by default.
So if you have a sample HTML document for me to work with, it would help me investigate this further.
Anyway the current code we have to look at the dropped content is something like this:
Code: Select all
/**
* @param event The Drop event.
* @return The TransferedGemNodes and the SelectedNodes encapsulated into a TransferDataNodes object.
*/
private AuthorTransferredObject getTransferDataNodesFromDropEvent(final DropTargetEvent event, boolean clear) {
AuthorTransferredObject transferNode = null;
TransferData[] dataTypes = event.dataTypes;
for (int i = 0; i < dataTypes.length; i++) {
TransferData dataType = dataTypes[i];
if (LocalSelectionTransfer.getTransfer().isSupportedType(dataType)) {
if (LocalSelectionTransfer.getTransfer().getSelection() instanceof IStructuredSelection) {
IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection();
if (selection.getFirstElement() instanceof AuthorTransferredObject) {
transferNode = (AuthorTransferredObject) selection.getFirstElement();
if (clear) {
LocalSelectionTransfer.getTransfer().setSelection(null);
}
}
}
break;
} else if (TextTransfer.getInstance().isSupportedType(dataType)) {
transferNode = new AuthorTransferredObject(
(String) event.data,
null,
null,
null,
null,
null,
null);
}
}
return transferNode;
}
Maybe if we also looked at the "HTMLTransfer" in such cases, but I would need to reproduce the issue on my side first...
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 51
- Joined: Mon Oct 01, 2012 3:05 pm
Re: Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Hi Radu,
thanks for your quick reply!
I just created a sample xhtml page that causes the problem with the integrated InternetExplorer.
This Code only works on my environmant from erxternal browsers. (IE or Firefox)
thanks for your quick reply!
I just created a sample xhtml page that causes the problem with the integrated InternetExplorer.
Code: Select all
<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
[draggable="true"] {
cursor: move;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
/* Required to make elements draggable in old WebKit */
-khtml-user-drag: element;
-webkit-user-drag: element;
}
:not([draggable="true"]) {
cursor:default;
}
</style>
<title>TEST</title>
</head>
<div>
<conref id='safetyadvice' xmlns="http://www.w3.org/1999/xhtml" draggable="true" ref="001179">DRAG THIS<br/></conref>
<safetyadvice id='001179' class="danger" data-conref-type="fragment" nodeid="001179"
translate="yes" xmlNumber="001179"><?xmlNumber 001179?>
<cause>16663 - Safety Advice A</cause>
<action>
<step>16663 - Safety Advice A</step>
</action>
</safetyadvice>
<script type="text/javascript">
function handleDragStart(e) {
console.log("EVENIMENT ", e);
e.dataTransfer.effectAllowed='copyMove';
e.dataTransfer.setData('text', 'kguPreviewRefNode');
return true;
}
function handleDragOver(e){
e.preventDefault();
}
var element = document.getElementById("safetyadvice");
// attach event listener for DnD
element.addEventListener('dragstart', handleDragStart, false);
element.addEventListener('dragover', handleDragOver, false);
</script>
</div>
</html>
Stefan Nöbauer
Senior Solution Architect
KGU-Consulting GmbH
Senior Solution Architect
KGU-Consulting GmbH
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Hi Stefan,
I'm testing using Eclipse 4.7.1 on a Windows 10 machine.
I created an HTML document in my Project, right click and chose to open it in the "Web browser", then I dragged the "DRAG THIS" and dropped it in a DITA topic opened in the Author visual editing mode. The text "kguPreviewRefNode" was inserted.
So somehow I cannot reproduce the problem.
Could you also try this on your side with a clean Eclipse + Oxygen plugin installation? Just to see if your customizations might influence this or not...
Regards,
Radu
I'm testing using Eclipse 4.7.1 on a Windows 10 machine.
I created an HTML document in my Project, right click and chose to open it in the "Web browser", then I dragged the "DRAG THIS" and dropped it in a DITA topic opened in the Author visual editing mode. The text "kguPreviewRefNode" was inserted.
So somehow I cannot reproduce the problem.
Could you also try this on your side with a clean Eclipse + Oxygen plugin installation? Just to see if your customizations might influence this or not...
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 51
- Joined: Mon Oct 01, 2012 3:05 pm
Re: Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Hi Radu
I use Eclipse 3.7 and Oxygen 17
I try that with the clean oxygen installation.
Regards,
Stefan
I use Eclipse 3.7 and Oxygen 17
I try that with the clean oxygen installation.
Regards,
Stefan
Stefan Nöbauer
Senior Solution Architect
KGU-Consulting GmbH
Senior Solution Architect
KGU-Consulting GmbH
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Hi Stefan,
Yes, also please try with an Oxygen 20.0 installation because if there is a bug in Oxygen 17 we probably won't fix it anymore.
Regards,
Radu
Yes, also please try with an Oxygen 20.0 installation because if there is a bug in Oxygen 17 we probably won't fix it anymore.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 51
- Joined: Mon Oct 01, 2012 3:05 pm
Re: Problem DnD from Eclipse internal InternetExplorer into Oxygen Author
Hi Radu,
I had a hard time debugging this issue but finaly I found the reason.
It is because of an enablement description in one of our plugin.xml files for the paste command.
I didn't know that this tester is called while dragging into the editor.
So I changed the configuration in the enablement description to exclude the editor.
Regards
Stefan
I had a hard time debugging this issue but finaly I found the reason.
It is because of an enablement description in one of our plugin.xml files for the paste command.
I didn't know that this tester is called while dragging into the editor.
So I changed the configuration in the enablement description to exclude the editor.
Regards
Stefan
Stefan Nöbauer
Senior Solution Architect
KGU-Consulting GmbH
Senior Solution Architect
KGU-Consulting GmbH
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service