Skip to main content

Search and Top Navigation

#8655 closed bug (fixed)

Opened October 11, 2012 10:43AM UTC

Closed October 22, 2012 02:51PM UTC

Last modified October 23, 2012 04:12PM UTC

Spinner buttons displayed on top of Datepicker

Reported by: Benco Owned by:
Priority: minor Milestone: 1.9.1
Component: ui.spinner Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:
Description

When a Datepicker is displayed, if it is on top of a Spinner, its up and down buttons are visible.

demo : http://jsfiddle.net/Benco/W2CeV/

Affected browsers :

FF 15.0.1

IE 8.0

Chrome 22.0.1229.92 m

Safari 5.1.7

OS : Windows 7 Enterprise SP1

note : this had been reported before, but refused as a bug, since Spinner was a plugin at the time.

Ticket :http://bugs.jqueryui.com/ticket/3188

Attachments (0)
Change History (20)

Changed October 11, 2012 01:04PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

Set a z-index on the datepicker: http://jsfiddle.net/W2CeV/1/

Changed October 11, 2012 04:08PM UTC by Benco comment:2

This css rule shouldn't be needed for those two to work together.

Changed October 11, 2012 04:24PM UTC by scottgonzalez comment:3

If you have a better solution, please propose it. It must solve all z-index issues across all plugins.

Changed October 12, 2012 08:06AM UTC by Benco comment:4

I don't have a better solution, this one seems OK to me, but I think it should be default. Why not adding it to the spinner() function ?

Changed October 12, 2012 12:36PM UTC by scottgonzalez comment:5

Adding what to the spinner? The problem has nothing to do with spinner, it's fully contained within the datepicker.

Changed October 12, 2012 12:38PM UTC by Benco comment:6

Yes, that's what I meant to say, my mistake.

Changed October 12, 2012 12:51PM UTC by scottgonzalez comment:7

So you want the datepicker to pick an arbitrary z-index? We've been down this road, it's not better.

Changed October 12, 2012 12:53PM UTC by Benco comment:8

Why arbitrary ? Isn't it possible to find a value that acts correctly with the other widget that are part of JQueryUI ?

Changed October 12, 2012 01:07PM UTC by scottgonzalez comment:9

No. Values are dynamic. Dialogs stack, datepickers can be in dialogs, elements can have tooltips, etc.

Changed October 12, 2012 01:10PM UTC by Benco comment:10

Hum. A way could be to compute the z-index from the datepicker's container, but I guess that can't be done..

Changed October 12, 2012 01:11PM UTC by scottgonzalez comment:11

That's EXACTLY what we're doing, and you're asking us to change...

Changed October 12, 2012 01:16PM UTC by Benco comment:12

Then I don't get why it happens.

I understand that Spinner and Datepicker can be in different containers, in which case, I guess you can't do anything.

But if Datepicker and Spinner have the same container, and both have z-index computed from this container's z-index, it should be possible to make the Datepicker's z-index greater than Spinner's one.

Changed October 12, 2012 01:29PM UTC by scottgonzalez comment:13

That's just not true. Even if both widgets used that approach, they'd end up with the same z-index, which would cause problems. So far, in the 5 years of jQuery UI being around, nobody has found a solution that just works. It's up to you, the person building the page, to set the z-index appropriately for your specific situation.

Changed October 12, 2012 01:31PM UTC by Benco comment:14

OK. If you say it's no doable, then it's not. But I fear you will have a lot of bug cases regarding this point.

Changed October 22, 2012 02:47PM UTC by jzaefferer comment:15

resolution: worksforme
status: closedreopened

Changed October 22, 2012 02:51PM UTC by Jörn Zaefferer comment:16

resolution: → fixed
status: reopenedclosed

Spinner: Remove z-index from buttons. Whatever the original purpose, its not needed anymore. Fixes #8655 - Spinner buttons displayed on top of Datepicker.

Changeset: ac43938c8c1c908546cdb967dce11806bf2b4197

Changed October 22, 2012 02:52PM UTC by jzaefferer comment:17

We reviewed this again along with other dialog and z-index issues and fixed the invalid z-index inside spinner. Will be in 1.9.1.

Changed October 23, 2012 04:07PM UTC by Benco comment:18

That's great news! I'm glad to learn that, contrary to what has been said, a correct z-index CAN actually be computed, as I though it should be.

Thanks!

Changed October 23, 2012 04:11PM UTC by scottgonzalez comment:19

No, a correct z-index cannot be computed for the situations we discussed. The solution was to completely remove z-index.

Changed October 23, 2012 04:12PM UTC by Benco comment:20

Anyway, problem solved !