Make WordPress Core

Opened 16 years ago

Closed 14 years ago

Last modified 14 years ago

#6883 closed defect (bug) (fixed)

Thickbox Should Not Close When Clicked Outside Of Window (while uploading)

Reported by: intoxination's profile intoxination Owned by: azaozz's profile azaozz
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.5.1
Component: Upload Keywords: has-patch
Focuses: Cc:

Description

When you click on the overlay, Thickbox will close, which is the desirable function of Thickbox. This should be prevented while an upload is in progress though. Perhaps adding:

jQuery("#TB_overlay").unbind("click",tb_remove);

When the upload starts and then once the upload finishes call:

jQuery("#TB_overlay").click(tb_remove);

Would be a good working method to fix this. Of course the uploader iFrame would have to call this method from the opener window, since Thickbox is instanced from there.

Attachments (1)

6883.patch (1.4 KB) - added by hakre 14 years ago.

Download all attachments as: .zip

Change History (15)

#1 @tellyworth
16 years ago

Sounds fair to me. Also related: when multiple uploads are in progress, it's possible to stop them by clicking Insert Into Post on the first one. Those buttons (and perhaps the whole Show detail sliding whatsit) should be disabled while other uploads are in progress, in the same way you've suggested above.

And just in case it comes up: under normal circumstances the Thickbox should definitely close when you click outside its box.

#2 @Denis-de-Bernardy
15 years ago

  • Component changed from General to JavaScript
  • Keywords has-patch dev-feedback added; thickbox uploader removed
  • Milestone changed from 2.9 to 2.8
  • Owner changed from anonymous to azaozz

#3 @Nicholas91
15 years ago

  • Cc dragos.nicholas@… added
  • Summary changed from Thickbox Should Not Close When Clicked Outside Of Window to Thickbox Should Not Close When Clicked Outside Of Window (while uploading)

#4 @azaozz
15 years ago

  • Milestone changed from 2.8 to 2.9

This is a good idea but perhaps we should replace Thickbox as it's no longer supported. Better to fix together with the rest of the media improvements in 2.9.

#5 @Denis-de-Bernardy
15 years ago

  • Keywords dev-feedback removed

#6 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; has-patch removed

#7 @azaozz
15 years ago

  • Milestone changed from 2.9 to 3.0

Moving to 3.0 pending replacement of Thickbox.

#8 @caesarsgrunt
14 years ago

  • Component changed from JavaScript to Upload

@hakre
14 years ago

#9 @hakre
14 years ago

  • Keywords has-patch added; needs-patch removed

I'll pick up the ground initiative and created a first patch.

#10 follow-up: @azaozz
14 years ago

Don't think we need to modify thickbox.js in order to do this.

#11 @azaozz
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12554]) Don't close thickbox when clicking outside the iframe while uploading, fixes #6883

#12 in reply to: ↑ 10 @hakre
14 years ago

Replying to azaozz:

Don't think we need to modify thickbox.js in order to do this.

With all tests I did I needed to otherwise the unbind did not work. Have you tested your code?

#13 @hakre
14 years ago

Nevermind, tested it, commited code works properly. Maybe because I did not put topWin in a global var.

Note: See TracTickets for help on using tickets.