Incorrect popup position


Demo
https://codesandbox.io/s/dropdown-width-bug-7u7p0?file=/src/App.vue

Steps for reproduce:
1) Open demo link
2) open sandbox in new window

3) Make window width more than 730px but less than 1400px
4) click on Dropdown in the bottom of the screen

Expected result:
Popup will be shown right above the dropdown

Actual result:
Popup shown above the dropdown, but at the left side of the screen


(sorry for photo quality, popup always closes when i trying to make a screenshot) 

7 Replies

SN Sevvandhi Nagulan Syncfusion Team December 10, 2020 10:24 AM UTC

Hi Andrew, 



Greetings from Syncfusion support. 


We have checked the reported query. By default, the popup opens relative to the input element, since the provided popupWidth is greater than the input element’s width hence the reported issue occurs. With the provided sample the popup has no space to open at bottom and right positions. Hence, we suggest you to set the Width for the popup, lower than the input element width to resolve the reported issue. Please refer the code below. 



<div class="dropdown-wrapper"> 
  <span style="width: 50%"></span> 
  <div style="width: 50%"> 
    <ejs-dropdownlist 
      id="dropdownlist" 
      ref="dropdownObj" 
      placeholder="Select a country" 
      :popupWidth="'700px'" 
      :width="'700px'" 
      :dataSource="dataSource" 
      :fields="fields" 
    ></ejs-dropdownlist> 
  </div> 
</div> 





Please check the above suggestion and get back to us if you need further assistance. 


Regards, 
Sevvandhi N 



AM Andrew Mandruk December 10, 2020 11:08 AM UTC

Hello Sevvandhi Nagulan

It still seems to me that this is a bug. 

If we have a free space below the dropdown (on the same window width), than popup placed as expected.


The same behavior expected (and position relatively left window edge), but popup should be above dropdown, when we have no free space below the dropdown.

Demo of positioning while there is free space below the dropdown (for positioning example):



SP Sureshkumar P Syncfusion Team December 16, 2020 08:14 AM UTC

Hi Andrew, 
 
Thanks for your update. 
 
Based on your shared sample, you have missed to add the width property value as mentioned in our previous solution. So, we suggest you add both the popupwidth and width property to resolve the issue. 
 
 
Get back to us if you need any further assistance. 
 
Regards, 
Sureshkumar P 



AM Andrew Mandruk December 16, 2020 10:31 AM UTC

Hi


I need to use different width of dropdown and popup.

Here i have added :width property, but it doesn't work properly:


SP Sureshkumar P Syncfusion Team December 17, 2020 09:00 AM UTC

Hi Andrew, 
 
Thanks for your update. 
 
Based on your shared sample, when you have more width into the popup element compare with input element, the popup aligns left to the component position. So, we suggest you use the same width property value as both component width and popupWidth to resolve the issue. 
 
We have modified the sample based on your shared information. please refer the modified sample here: https://codesandbox.io/s/dropdown-width-bug-forked-h7j5d  
 
Regards, 
Sureshkumar P 



BV Bram van Elderen December 17, 2020 11:43 AM UTC

Hello, Sureshkumar,

To add to Andrew's explanation.

We really need a different popupWidth. We cannot make these equal due to the content we need to add within the popup. So that is not a possible solution for us. (And seems like a workaround in the first place)

But as Andrew explained before this could be solved like follows:




SP Sureshkumar P Syncfusion Team December 24, 2020 06:57 AM UTC

Hi All,  
  
Thanks for your patience,  
  
We have validated your reported query and have considered “Popup is not positioned properly after collision” as a bug from end and the fix will be included with our patch release on the 2nd week of January.  
  
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further enquiries through this link: https://www.syncfusion.com/feedback/20904/    
  
Regards,  
Sureshkumar P 


Loader.
Up arrow icon