Last Comment Bug 633160 - move away from the page by file drop is possible in spite of modal file picker dialog
: move away from the page by file drop is possible in spite of modal file picke...
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: mozilla9
Assigned To: Brian R. Bondy [:bbondy]
:
Mentors:
http://www.freepdfconvert.com/
Depends on: 357601
Blocks: 513162 573321
  Show dependency treegraph
 
Reported: 2011-02-10 04:53 PST by Kuno Meyer
Modified: 2011-09-01 13:53 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
Patch for file picker's parent accepts drops in spite of file picker being modal. (1.64 KB, patch)
2011-08-08 10:00 PDT, Brian R. Bondy [:bbondy]
no flags Details | Diff | Splinter Review
Patch for file picker's parent accepts drops in spite of file picker being modal. (1.65 KB, patch)
2011-08-08 17:04 PDT, Brian R. Bondy [:bbondy]
no flags Details | Diff | Splinter Review
Fix for drag and drop when picker is open w/ latest review comments implemented (1.59 KB, patch)
2011-08-11 19:19 PDT, Brian R. Bondy [:bbondy]
neil: review+
Details | Diff | Splinter Review
Fix for drag and drop when picker is open w/ latest review comments implemented (1.59 KB, patch)
2011-08-13 19:05 PDT, Brian R. Bondy [:bbondy]
netzen: review+
Details | Diff | Splinter Review

Description Kuno Meyer 2011-02-10 04:53:50 PST
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b11) Gecko/20100101 Firefox/4.0b11
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b11) Gecko/20100101 Firefox/4.0b11

It is possible to move away from a web page by "file drop" even if that page has a modal file picker dialog open. This seems inconsistent, since FF otherwise enforces the modality of the dialog and even prevents tab switching.

Reproducible: Always

Steps to Reproduce:
1. Go to a web page with a file picker (e.g. http://www.freepdfconvert.com/)
2. Open the file picker by clicking on "browse" --> a modal dialog appears
3. Drag a local file into the web page area in the background of the modal picker dialog, drop it there.
Actual Results:  
The file content gets loaded into the browser. The old page is gone.

Expected Results:  
File dropping should not be possible while the file picker is open.
Comment 1 Alice0775 White 2011-02-10 05:58:18 PST
Regression window(cached m-c hourly):
Works:
http://hg.mozilla.org/mozilla-central/rev/522df66198cf
Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a6pre) Gecko/20100624 Minefield/3.7a6pre ID:20100624185700
Fails:
http://hg.mozilla.org/mozilla-central/rev/51bd519736c4
Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a6pre) Gecko/20100624 Minefield/3.7a6pre ID:20100624221810
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=522df66198cf&tochange=51bd519736c4
Comment 2 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-02-11 13:27:17 PST
This is a regression but I don't think it's worth blocking on.
Comment 3 Brian R. Bondy [:bbondy] 2011-08-08 09:53:54 PDT
Adding a depends on Bug 357601 not because the regression was introduced there (that's not even pushed yet), but because the fix I made is based on code in my patch queue that is in Bug 357601.
Comment 4 Brian R. Bondy [:bbondy] 2011-08-08 10:00:17 PDT
Created attachment 551485 [details] [diff] [review]
Patch for file picker's parent accepts drops in spite of file picker being modal.
Comment 5 neil@parkwaycc.co.uk 2011-08-08 16:29:17 PDT
Comment on attachment 551485 [details] [diff] [review]
Patch for file picker's parent accepts drops in spite of file picker being modal.

Might want to use mWindow->IsEnabled instead.
Comment 6 Brian R. Bondy [:bbondy] 2011-08-08 17:04:31 PDT
Created attachment 551624 [details] [diff] [review]
Patch for file picker's parent accepts drops in spite of file picker being modal.

Implemented review comments.
Comment 7 neil@parkwaycc.co.uk 2011-08-11 09:49:36 PDT
Comment on attachment 551624 [details] [diff] [review]
Patch for file picker's parent accepts drops in spite of file picker being modal.

>+  nsWindow * wnd = static_cast<nsWindow *>(mWindow);
I said mWindow->IsEnabled; no need to cast! r=me with that fixed.
Comment 8 Brian R. Bondy [:bbondy] 2011-08-11 19:19:30 PDT
Created attachment 552575 [details] [diff] [review]
Fix for drag and drop when picker is open w/ latest review comments implemented
Comment 9 Brian R. Bondy [:bbondy] 2011-08-13 19:05:36 PDT
Created attachment 552923 [details] [diff] [review]
Fix for drag and drop when picker is open w/ latest review comments implemented
Comment 10 Brian R. Bondy [:bbondy] 2011-08-31 13:38:36 PDT
This was pushed to try, results in progress:
http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=cde44aaad760
Comment 11 Brian R. Bondy [:bbondy] 2011-09-01 07:22:46 PDT
Pushed to mozilla-inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/191f7bab5f5a
Comment 12 Ed Morley [:emorley] 2011-09-01 13:53:43 PDT
http://hg.mozilla.org/mozilla-central/rev/191f7bab5f5a

Note You need to log in before you can comment on or make changes to this bug.