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
    • Rank:
      44412

      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.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting that and sharing a patch.

          Show
          Michael de Raadt added a comment - Thanks for reporting that and sharing a patch.
          Hide
          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
          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
          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
          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
          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
          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
          Dan Poltawski added a comment -

          Ping.

          Show
          Dan Poltawski added a comment - Ping.
          Hide
          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
          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
          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
          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
          Dan Poltawski added a comment -

          Thanks for clarifying Fred.

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

          Show
          Dan Poltawski added a comment - Thanks for clarifying Fred. I've integrated this now (22, 23 and master).
          Hide
          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
          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
          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
          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: