Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#6883 closed defect (bug) (fixed)

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

Reported by: intoxination Owned by: azaozz
Priority: normal Milestone: 3.0
Component: Upload Version: 2.5.1
Severity: normal Keywords: has-patch
Cc: dragos.nicholas@…

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 3 years ago.

Download all attachments as: .zip

Change History (15)

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.

  • 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
  • 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)
  • 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.

  • Keywords dev-feedback removed
  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.9 to 3.0

Moving to 3.0 pending replacement of Thickbox.

  • Component changed from JavaScript to Upload

hakre3 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: ↓ 12   azaozz3 years ago

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

  • 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   hakre3 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?

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.