WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#6883 closed defect (bug) (fixed)

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

Reported by: intoxination Owned by: 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 4 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 tellyworth6 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.

comment:2 Denis-de-Bernardy5 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

comment:3 Nicholas915 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)

comment:4 azaozz5 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.

comment:5 Denis-de-Bernardy5 years ago

  • Keywords dev-feedback removed

comment:6 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch removed

comment:7 azaozz4 years ago

  • Milestone changed from 2.9 to 3.0

Moving to 3.0 pending replacement of Thickbox.

comment:8 caesarsgrunt4 years ago

  • Component changed from JavaScript to Upload

hakre4 years ago

comment:9 hakre4 years ago

  • Keywords has-patch added; needs-patch removed

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

comment:10 follow-up: azaozz4 years ago

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

comment:11 azaozz4 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

comment:12 in reply to: ↑ 10 hakre4 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?

comment:13 hakre4 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.