You are not logged in.
Pages: 1
Hi
I just installed Xinha and it is working perfectly fine.
However, when I click on a button, say the Bold button, and drag and drop it on the textarea, I can see a grid of all the images appear on the textarea. Is there anyway I can prevent this from happening? You can see this happening on the demo page too..
Any input is really appreciated,
Thanks a lot
WebPrgmer.
Last edited by WebPrgmer (2006-03-14 14:44:42)
Offline
Is there a way to prevent that from happening?
Offline
Prevent what to happen ?
Prevent the whole image to appear and have only the image of the button ?
I'm afraid i dont think you can prevent it.
Prevent the drag & drop from the toolbar ?
That can be done i think by tweaking a bit the mousedown, mousemove and mouseup events on the icons.
What do you want to prevent ?
Offline
Hi mokhet,
Heres wht I meant:
When I click on a button, say the Bold or the Italic button, and drag and drop it on the textarea (i.e. click from toolbar - drag - drop to textarea), I can see a grid of all the images appear on the textarea. Is there anyway I can prevent this from happening? You can see this happening on the demo page too..
Thanks,
WebPrgmer.
Offline
Lol, a cut and paste of your first post doesnt help to understand what you want to prevent happening.
So I ask again... What do you want to prevent ? Please dont cut/paste again.
In your question, try to not use the word "this", please explain !!!
Is there anyway I can prevent this from happening?
What is "this" ? What do you think should happen when you drag & drop an icon from the toolbar ? Why the hell would someone drag & drop thoses icons anyway. What do you want to be accomplished while drag & dropping ?
Your next message will be my last attempt to understand your problem. Please explain !
Offline
Hey Moket,
I am so sorry for makin it so confusing...
Well I want to prevent the image grid from being shown on the textarea when we do a drag and drop. I do not want anything to show when someone does a drag and drop from the toolbar to the textarea. In other words, I do not want anything to be accomplished while dragging and dropping the icons.
And you are right, I dont think anyone would drag and drop those icons anyway. I never did it myself till one of the users pointed it out to me.
I sure hope I was more clear this time,
Thanks again
WebPrgmer.
Offline
Ah, thank for explaining what was "this"
I cant reproduce the issue with Firefox 1.5, but I of course see the problem with IE6.
Try this patch, it solves the problem on my side.
Index: htmlarea.js
===================================================================
--- htmlarea.js (revision 471)
+++ htmlarea.js (working copy)
@@ -1031,6 +1031,13 @@
}
});
+ // when we drag the icon, cancel the ondrag event
+ // IE only
+ if (HTMLArea.is_ie)
+ {
+ el.ondrag = function() { return false; };
+ }
+
var i_contain = HTMLArea.makeBtnImg(btn[1]);
var img = i_contain.firstChild;
el.appendChild(i_contain);
Offline
Hi Mokhet
Thanks a lot for the patch. "That" sure solved the problems with "This"..
Offline
That looks to me like something that really should be committed.
You could think of the user's ability to drag the toolbar main image into the editor along the lines of say, clicking outside the editor and then pasting HTML above the editor when a plugin hasn't implemented a line that focuses the editor first. For plugins this very undesirable result should be prevented by editor.focusEditor(), even though it is caused by the user clicking the page outside the editor after launching a plugin but before using the plugin. A simple line of code saves the users from themselves, and they can't point to their inserted content on the page above the editor and say "Hah! I broke it!" or "Oh crap, why did it do that? What a piece of junk. Ethel, come over here and look at what this silly thing just did!"
Likewise, Xinha currently allows the user to preform the goofy action of dragging the toolbar main image into the editor. Certainly it might be desirable that someone be able to drag an image from a webpage into the editor, but the toolbar image is part of the "software" and you should theoretically not be able to drag it into the editor any more than you can drag the Microsoft Word toolbar into a Word doc. I guess that at some point, unfortunately, not preventing the user from being able to do something like this is "bad GUI usability" if there is indeed a simple known way to prevent it from happening (i.e. prevent the user from being able to turn the XINHA GUI into content in the editor itself).
The difference of course between this and inserting content above the editor is that I can't imagine someone doing this by accident. This patch would make the editor be more bullet-proof against anyone evaluating if their users would have problems using XINHA.
Offline
patch commited in changeset :474
Offline
Pages: 1