Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8655 closed bug (fixed)

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

Change History (20)

comment:1 Changed 7 years ago by Scott González

Resolution: worksforme
Status: newclosed

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

comment:2 Changed 7 years ago by Benco

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

comment:3 Changed 7 years ago by Scott González

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

comment:4 Changed 7 years ago by Benco

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 ?

comment:5 Changed 7 years ago by Scott González

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

comment:6 Changed 7 years ago by Benco

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

comment:7 Changed 7 years ago by Scott González

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

comment:8 Changed 7 years ago by Benco

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

comment:9 Changed 7 years ago by Scott González

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

comment:10 Changed 7 years ago by Benco

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

comment:11 Changed 7 years ago by Scott González

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

comment:12 Changed 7 years ago by Benco

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.

comment:13 Changed 7 years ago by Scott González

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.

comment:14 Changed 7 years ago by Benco

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.

comment:15 Changed 7 years ago by Jörn Zaefferer

Resolution: worksforme
Status: closedreopened

comment:16 Changed 7 years ago by Jörn Zaefferer

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

comment:17 Changed 7 years ago by Jörn Zaefferer

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.

comment:18 Changed 7 years ago by Benco

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!

comment:19 Changed 7 years ago by Scott González

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

comment:20 Changed 7 years ago by Benco

Anyway, problem solved !

Note: See TracTickets for help on using tickets.