Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    isLeftButtonDown on IE11

    Hi,

    Can you verify if

    Code:
    com.smartgwt.client.widgets.menu.Menu.addItemClickHandler(
      new ItemClickHandler() {
        public void onItemClick(ItemClickEvent event) {
          if (!event.isLeftButtonDown()) return;
    works in IE11?

    We get the feeling it doesn't. Other browsers, including IE10, work OK.

    This is on SmartClient Version: v9.0p_2013-10-27/Pro Deployment (built 2013-10-27).

    I don't have an IE11 myself, so cannot test this on a much newer build, but the JavaScript of that build compared to v9.1p_2014-07-12 looks the same, so I'm assuming it won't work either.


    TIA

    #2
    BTW: the context of this check is to do nothing when a user Right-clicks on a MenuItem.

    I think I will change this check to "if (isRightButtonDown) return;"
    Then, if this button JavaScript check would fail on newer browsers, it won't block the functionality when clicking with the left mouse button.


    Or do you have any other idea for this problem?

    Comment


      #3
      There was a problem introduced by IE11 changing how it reports buttons. It was fixed long ago - if you are examining the JavaScript for changes and not seeing any, you are either looking in the wrong place, or not actually looking at files from the latest build.

      Since the button reporting issue has already been worked around, there's no need to revisit your approach.

      Comment


        #4
        You're right, it's fixed in v9.1p_2014-07-12.


        But this is the JS code, which is the same as in build v9.0p_2013-10-27
        Code:
        leftButtonDown : function (event) {
            return ((event || this.lastEvent).buttonNum == 1);
        },
        I guess the fix is somewhere else then.

        I was hoping to patch or add our own JS function in that branch so it would be fixed for IE11 there, as using the newer SmartGWT build is not an option.

        Comment


          #5
          Right, the changes are elsewhere, and very complicated to explain. The right solution is to use the patched build.

          If you're uncomfortable with that, you could use Consulting to attempt to maintain a hand-patched version for a little while, but this is in fact much higher risk than just using the newer patched build since there is no way for a hand-patched build to run through our full suite of automated tests, so we can't recommend it.

          Comment


            #6
            Darn, that's what I thought.

            I'll go change our check to "if (isRightButtonDown) return;" that will make things work on IE11. Worst case, IE11 alone can also right-click on it. That's a less bigger deal than the left click not working at all.

            Comment

            Working...
            X