Closed Bug 557279 Opened 14 years ago Closed 14 years ago

Drag & drop into plug-ins is broken

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Windows 7
defect
Not set
major

Tracking

(blocking2.0 beta1+, blocking1.9.2 -)

RESOLVED FIXED
mozilla2.0b1
Tracking Status
blocking2.0 --- beta1+
blocking1.9.2 --- -

People

(Reporter: vlad.alexander, Assigned: Felipe)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a4pre) Gecko/20100404 Minefield/3.7a4pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a4pre) Gecko/20100404 Minefield/3.7a4pre

We are a vendor of a popular WYSIWYG editor plug-in called XStandard. In the latest Minefield builds, the ability to drag and drop into our plug-in is broken. We support two types of drag & drop - ability to drag a file into the plug-in and the ability to drag text into the editor from other applications.

Reproducible: Always

Steps to Reproduce:
1. Install this plug-in:
http://misc.xstandard.com/mozilla/NPXStandard.dll

2. Go to this test page which will load our plug-in.
http://xstandard.com/pro.asp

3. Try to drag and drop a .txt/.doc/.zip or .gif/.jpg/.png file into the plug-in.

4. Highlight some text above the plug-in and try to drag and drop it into the plug-in.
Actual Results:  
Drag & drop fails.

Expected Results:  
Drag & drop files into the editor, the editor will upload them to the server and create appropriate markup for them (hyperlink or image). Drag & drop text into the editor will have equivalent results to copy and paste.
Is this a regression? Did it work in Firefox 3.5 or 3.6, is it only broken in trunk builds (Gecko 1.9.3)?
blocking2.0: --- → ?
>Is this a regression?
Yes

>Did it work in Firefox 3.5 or 3.6
Yes. Just tested again with the latest release and drag & drop works:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)

>is it only broken in trunk builds (Gecko 1.9.3)?
Correct. Not working in the latest nightly:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a5pre) Gecko/20100419 Minefield/3.7a5pre

Additional info. Not only does drag and drop from external sources into the plug-in do not work but also drag & drop within the plug-in does not work either.
Is there any update on this bug? This issue is _very_ important to us and our users.
Any chance you could download nightly builds and find the date when this stopped working? You can find nightly builds at ftp://ftp.mozilla.org/pub/firefox/nightly/.
Glad to do it. Where can I find builds before 2010-04-05 (the date I reported this bug)? Also, besides being a bit confused by the new naming conventions for the builds, the folders in the FTP site you provided only contains Mac and Linux builds.
ftp://ftp.mozilla.org/pub/firefox/nightly/2010/ You'll want to grab builds out of the "mozilla-central" directories.
Oh, sorry, only answered half your question there. If a directory doesn't contain Win32 builds, look in the previous/next one, they're around, but not necessarily in every single directory.
Ok, thanks for doing the leg work there! That range points to the day we enabled multi-process plugins by default.

Out of curiosity, if you go into about:config and change the pref dom.ipc.plugins.enabled to false with a recent nightly build, does the problem go away?
Status: UNCONFIRMED → NEW
Component: General → Plug-ins
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: general → plugins
> change the pref dom.ipc.plugins.enabled to false with a
> recent nightly build, does the problem go away?
Yes, after re-starting the browser.
Blocks: OOPP
Assignee: nobody → jmathies
Vlad, what do you all use internally for drag and drop apis? IDropTarget?
Hmm, silverlight 4 added file drag and drop support. Will try to find an example control to test on over the weekend. If that's broken we probably want to block on this for 1.9.4.
blocking1.9.2: --- → ?
>Vlad, what do you all use internally for drag and drop apis? IDropTarget?
We are using MFC class "COleDropTarget" to accept dropping items.
Probably related, the SL4 d&d demo located here - 

http://www.silverlighttoys.com/Samples/SL4/Carousel/

Fails with the following error in the console:

Error: Unhandled Error in Silverlight Application 2531 An error has occurred. [Line: 6 Position: 15]   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at PolygonNavigation.MainPage.InitializeComponent()
   at PolygonNavigation.MainPage..ctor()
   at PolygonNavigation.App.Application_Startup(Object sender, StartupEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
Source File: http://www.silverlighttoys.com/Samples/SL4/Carousel/
Line: 0

Non-oopp Namaroka builds work fine. Definitely OOPP related. I'll see if I can get a log.
Blocking for now, but we might ship without it as I don't think there's a lot of Silverlight out there that uses DnD.

Can I get a confirmation that this is Silverlight only?
blocking1.9.2: ? → .4+
(In reply to comment #15)
> Blocking for now, but we might ship without it as I don't think there's a lot
> of Silverlight out there that uses DnD.
> 
> Can I get a confirmation that this is Silverlight only?

I haven't been able to confirm this yet, not even sure that error is related to d&d, it's just the only demo I've been able to find. There are some samples but I'm lacking vs 2010 to build them, going to try and track that down today.

Vlad's plugin is safe for 3.6.4, so I think this is ok to not-block.
In comment 16 "safe" means the Vlad's app works on 3.6.4 (but not trunk)? If so we'll remove the 1.9.2.4 blocking flag.
If someone can point me to specific builds, I will be happy to test them for this issue.
(In reply to comment #18)
> If someone can point me to specific builds, I will be happy to test them for
> this issue.

You can find the 3.6.4 candidate builds at http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.6.4-candidates/ 

Currently build 4 is the latest, however there is a build 5 due to be released at the end of this week. 

As far as I know each candidate is a RC for the final 3.6.4 unless new issues are found, in which case the fixes are incorporated into a new candidate.
This bug does _not_ affect our plug-in in RC 3.6.4 build 4.
We just discovered another bug related to OOPP. I am reporting it here but can report it in a separate bug report if necessary.

When a plug-in calls a JavaScript function on a web page and that function pops-up an alert box, the browser hangs.

Set do.ipc.plugins.enabled to true. Go to this page and press the only button on the plug-in's toolbar:
http://misc.xstandard.com/mozilla/events.htm

Works fine if do.ipc.plugins.enabled is set to false.
The alert issue is covered in bug 561075.
Removing 3.6.4 blocking flag based on comment 20
blocking1.9.2: .4+ → -
We need to sort this out for beta1 IMO, or for final at least.
blocking2.0: ? → beta1+
Assignee: jmathies → felipc
So the MFC framework expects the host to have COM initialized. 
Jim: in fact we already called CoInitialize, but drag-and-drop really needs OleInitialize instead.
Attachment #450470 - Flags: review?(jmathies)
Comment on attachment 450470 [details] [diff] [review]
Calls OleInitialize

We do the same thing in nsWindow for the parent. Nice catch!
Attachment #450470 - Flags: review?(jmathies) → review+
http://hg.mozilla.org/mozilla-central/rev/0915072f1da9
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: