Shindig
  1. Shindig
  2. SHINDIG-1476

TabSet feature left/right scroll elements don't stop propagation of the click event

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3, 2.5.0-beta1
    • Component/s: Javascript
    • Labels:
      None

      Description

      The TabSet feature doesn't stop propagation of the click events on the left and right arrows when there are too many tabs to display in a line. This is, for the most part, ok - the browser sees that the link is javascript:void(0) and simply no-ops. However, in our Shindig implementation we set a default target attribute on the base tag (i.e. <base href="gadget.xml" target="_blank">) and in Firefox and IE clicking the scrollers causes a new window to be opened and switched to. This is, obviously, not ideal. Chrome is unaffected because it realises that javascript:void(0) is still a no-op in a new window.

      We should .stopPropagation() and .preventDefault() on the event in the onclick (and the equivalent code for IE) in the tab JS feature, so that this problem can't arise. All we are doing is preventing the browser from executing the no-op void(0).

        Activity

        Hide
        Mat Mannion added a comment -

        Patch prevents default execution of click event in onclick handler.

        Show
        Mat Mannion added a comment - Patch prevents default execution of click event in onclick handler.
        Hide
        Mat Mannion added a comment -
        Show
        Mat Mannion added a comment - Reviewable here: http://codereview.appspot.com/3310041/
        Hide
        Mat Mannion added a comment -

        Attached updated patch as per review

        Show
        Mat Mannion added a comment - Attached updated patch as per review
        Hide
        Paul Lindner added a comment -

        fixed with small changes to whitespace at end-of-lines

        Show
        Paul Lindner added a comment - fixed with small changes to whitespace at end-of-lines
        Hide
        Paul Lindner added a comment -

        part of 2.5.0-beta1 release.

        Show
        Paul Lindner added a comment - part of 2.5.0-beta1 release.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mat Mannion
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development