Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-35675

constrained dateselector can appear in wrong places

    Details

    • Testing Instructions:
      Hide

      Test pre-requisites

      • To be tested on ALL major browsers

      Test steps

      1. Visit a few pages where the popup calendar is used (new event, module settings, ...)
      2. Make sure it pops up nicely above the select boxes, even when the page is scrolled.
      Show
      Test pre-requisites To be tested on ALL major browsers Test steps Visit a few pages where the popup calendar is used (new event, module settings, ...) Make sure it pops up nicely above the select boxes, even when the page is scrolled.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-35675-master

      Description

      Hi,

      on moodle.fhnw.ch, we noticed that the dateselector could appear in wrong places (like: always at the top of the page).

      While this is probably a CSS-YUI interaction bug, we noticed:

      1. the definition of constraints in lib/form/yui/dateselector/dateselector.js is incoherent:
        • on line 118, the M.form.dateselector is constrained to the 'form' ancestor
        • on line 248, the panel is then re-constrained to the 'body' ancestor.
          This was addressed in MDL-32297 but apparently partly so.
      2. we could restore a sane behaviour by dropping the dateselector constrains completely.

      The patch to do the latter as well as a screenshot of the problem are attached.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting that and sharing a patch.

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting that and sharing a patch.
              Hide
              fred Frédéric Massart added a comment -

              Thanks for providing a patch for this Didier!

              Sending for peer review. I added a commit on top of the patch to remove the constrain to viewport (when constrain is set to true), this would cause the popup to open over the select boxes if those are at the top of the viewport.

              Cheers!

              Show
              fred Frédéric Massart added a comment - Thanks for providing a patch for this Didier! Sending for peer review. I added a commit on top of the patch to remove the constrain to viewport (when constrain is set to true), this would cause the popup to open over the select boxes if those are at the top of the viewport. Cheers!
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Patch looks good Fred, although I can't really find any reason, why this constrain was added in the first place.

              [y] Syntax
              [-] Output
              [y] Whitespace
              [-] Language
              [-] Databases
              [y] Testing
              [-] Security
              [-] Documentation
              [y] Git
              [y] Sanity check

              Pushing it for integration review.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Patch looks good Fred, although I can't really find any reason, why this constrain was added in the first place. [y] Syntax [-] Output [y] Whitespace [-] Language [-] Databases [y] Testing [-] Security [-] Documentation [y] Git [y] Sanity check Pushing it for integration review.
              Hide
              poltawski Dan Poltawski added a comment -

              Hi Fred,

              Can you look at MDL-26649 and see how these two issues interrelate?

              Are we improving the situation in this issue at all?

              Show
              poltawski Dan Poltawski added a comment - Hi Fred, Can you look at MDL-26649 and see how these two issues interrelate? Are we improving the situation in this issue at all?
              Hide
              poltawski Dan Poltawski added a comment -

              Ping.

              Show
              poltawski Dan Poltawski added a comment - Ping.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              AFAIK, we are not doing anything about MDL_26649.
              But it will be nice to see popup on click of an icon and not input field or have pop-up appear on right (and left in RTL )

              Show
              rajeshtaneja Rajesh Taneja added a comment - AFAIK, we are not doing anything about MDL_26649. But it will be nice to see popup on click of an icon and not input field or have pop-up appear on right (and left in RTL )
              Hide
              fred Frédéric Massart added a comment - - edited

              Hi Dan,
              MDL-26649 is about not having the select box dropdowns to overlap the selector. That is something that I didn't have time to investigate but I had a chat with Andrew Nicols who was surprised that this behaviour occurred. Anyway, apparently some browsers were not displayed properly the date selector, so by removing the contrains in this issue I ensure that it opens on the top of the select boxes and not somewhere random.
              Cheers.

              Show
              fred Frédéric Massart added a comment - - edited Hi Dan, MDL-26649 is about not having the select box dropdowns to overlap the selector. That is something that I didn't have time to investigate but I had a chat with Andrew Nicols who was surprised that this behaviour occurred. Anyway, apparently some browsers were not displayed properly the date selector, so by removing the contrains in this issue I ensure that it opens on the top of the select boxes and not somewhere random. Cheers.
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks for clarifying Fred.

              I've integrated this now (22, 23 and master).

              Show
              poltawski Dan Poltawski added a comment - Thanks for clarifying Fred. I've integrated this now (22, 23 and master).
              Hide
              abgreeve Adrian Greeve added a comment -

              Tested on the 2.2, 2.3 and master integration branches.
              Tested on ALL major browsers.
              The date selector currently always displays above the select boxes.
              Test passed.

              Show
              abgreeve Adrian Greeve added a comment - Tested on the 2.2, 2.3 and master integration branches. Tested on ALL major browsers. The date selector currently always displays above the select boxes. Test passed.
              Hide
              poltawski Dan Poltawski added a comment -

              Congratulations! Another bug solved.. only another 7330 to go, thanks for contributing to contributing to 0.8% of all bugs being fixed this week!

              ciao
              Dan

              Show
              poltawski Dan Poltawski added a comment - Congratulations! Another bug solved.. only another 7330 to go, thanks for contributing to contributing to 0.8% of all bugs being fixed this week! ciao Dan

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Jan/13