This is a migrated thread and some comments may be shown as answers.

Palette positioning problem when placing the picker inside "position: fixed" block

3 Answers 87 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Boleslav Malynovsky
Top achievements
Rank 1
Boleslav Malynovsky asked on 20 Apr 2010, 12:04 PM
Hello, and one more problem I found:

When I use some block of code:

<div style="position:fixed;">
<radpicker ...>
</div>

the palette is shown not correctly, since it's positioned with "position: absolute" and since it's placed inside "position: fixed" block, its "top" value means it shifts relatively to top left corner of parent block.
So if I place the parent element at "bottom: 0", the picker is shown far far below the bottom browser window border.

So, I have to go via DOM (or with styles) to define some other "top" (and, possibly "left") position for the picker palette element to solve the issue.

The best!

3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 23 Apr 2010, 02:01 PM
Hello Boleslav Malynovsky,
I tested your scenario with the following page and the latest version of the Telerik.Web.UI assembly (2010.1 415), but I was not able to reproduce the problem:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="radScriptManager" runat="server" />
    <div style="width: 200px; height: 200px; position: fixed; top: 100px; left: 100px;background-color:Red;">
        <telerik:RadColorPicker ID="RadColorPicker1" runat="server" ShowIcon="true">
        </telerik:RadColorPicker>
    </div>
 
    <div style="height:2000px;">test</div>
    </form>
</body>
</html>

Could you please test your page with the latest version and in case you can reproduce the problem with it - prepare and send me a simple running project that demonstrates it.

Kind regards,
Tsvetie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Agat
Top achievements
Rank 1
answered on 15 May 2010, 12:14 PM
yes. sure. I used the following code:

I tested it in Chrome 4.1 and Firefox 3.5.
And actually there were two problems:
1. if major content not scrolled, the picked opened not under the picker dropdown but at the bottom of the page.
2. if content scrolled - the picker appeared far at the bottom (out of browser borders, as I understand).

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test_telerik.aspx.cs" Inherits="test_telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server"></asp:ScriptManager>
    <div style="height:1500px;">
        some content
    </div>
    <div style="position:fixed;bottom:0; height:500px; width:100%; background:whitesmoke;">
        <telerik:RadColorPicker runat="server" ID="cp" PaletteModes="All" ShowIcon="true" ShowEmptyColor="false" PreviewColor="false">
        </telerik:RadColorPicker>
    </div>
    </form>
</body>
</html>

0
Tsvetie
Telerik team
answered on 17 May 2010, 01:18 PM
Hi Agat,
Thank you for the additional information. After some research, it turned out that the problem is a result of a problem in our $telerik.getLocation method, that we are aware of. The problem will be fixed for Q1 2010 SP2, that is scheduled for this week.

All the best,
Tsvetie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ColorPicker
Asked by
Boleslav Malynovsky
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Agat
Top achievements
Rank 1
Share this question
or