Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277931

Change subject: [WIP] Failing demo for DropdownWidget with an overlay
......................................................................

[WIP] Failing demo for DropdownWidget with an overlay

This exposes the FloatableElement regression from T130153 / I5b5d7936.
The dropdown added by this patch doesn't work: its menu is painted
in the top left corner of the document instead. If you scroll
up there you won't find it, though, because scrolling the
DropdownWidget out of view hides the menu.

Change-Id: I6b2b72244bf820d599d24c0539f5931e31323837
---
M demos/pages/widgets.js
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/31/277931/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 4ffd1af..914fafe 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1157,6 +1157,36 @@
                                        }
                                ),
                                new OO.ui.FieldLayout(
+                                       new OO.ui.DropdownWidget( {
+                                               label: 'Select one',
+                                               $overlay: $( '<div>' 
).appendTo( 'body' ).css( { position: 'absolute', top: 0, left: 0 } ),
+                                               menu: {
+                                                       items: [
+                                                               new 
OO.ui.MenuOptionWidget( {
+                                                                       data: 
'a',
+                                                                       label: 
'First'
+                                                               } ),
+                                                               new 
OO.ui.MenuOptionWidget( {
+                                                                       data: 
'b',
+                                                                       label: 
'Second'
+                                                               } ),
+                                                               new 
OO.ui.MenuOptionWidget( {
+                                                                       data: 
'c',
+                                                                       label: 
'Third'
+                                                               } ),
+                                                               new 
OO.ui.MenuOptionWidget( {
+                                                                       data: 
'd',
+                                                                       label: 
'Fourth'
+                                                               } )
+                                                       ]
+                                               }
+                                       } ),
+                                       {
+                                               label: 'DropdownWidget (using 
overlay)\u200E',
+                                               align: 'top'
+                                       }
+                               ),
+                               new OO.ui.FieldLayout(
                                        new OO.ui.DropdownInputWidget( {
                                                options: [
                                                        {

-- 
To view, visit https://gerrit.wikimedia.org/r/277931
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b2b72244bf820d599d24c0539f5931e31323837
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to