Announcement

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

    #16
    We've been unable to reproduce this problem. Does it happen on the sample for which we have code, or just in your app? Is it IE-specific or visible cross browser? Is it 100% reproducible or intermittent? If intermittent, how many clicks back and forth are required to get the problem? Any warnings in the dev console?
    And lastly - if you are seeing it on the sample we have, any chance you could record a screencast? It might help us to actually see the interaction since this could be a timing-based problem or similar...

    Thanks
    Isomorphic Software

    Comment


      #17
      Here is a sample you can use for reproducing.

      Load the sample and right-click on the "Name4" link, then right-click on the "Name3" link while the context-menu is still visible from "Name4", etc. In IE, the right-click stops working for me, and in the sample, the counter will stop incrementing too.

      If you click on the "Other" tab and then come back, the next right-click will work again.

      Code:
      public class Sandbox5 implements EntryPoint {
      
          private static int counter = 0;
      
          @Override
          public void onModuleLoad() {
              final Menu m = new Menu();
              m.addItem(new MenuItem("Item1"));
      
              TabSet ts = new TabSet();
              ts.setWidth100();
              ts.setHeight100();
              final Tab t = new Tab();
              Tab tOther = new Tab();
              tOther.setTitle("Other");
              t.setTitle("Counter: " + counter++);
      
              final ListGrid lg = new ListGrid();
              lg.setWidth100();
              lg.setHeight100();
              lg.setShowRollOver(Boolean.FALSE);
              lg.setShowSelectedStyle(Boolean.TRUE);
      
              ListGridField lgf1 = new ListGridField("name");
              lgf1.setAttribute("REFERENCE_LINK_ATTR", Boolean.TRUE);
              lgf1.setEscapeHTML(Boolean.FALSE);
              lgf1.setCellFormatter(new CellFormatter() {
                  @Override
                  public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                      StringBuilder builder = new StringBuilder();
                      builder.append("<a href=\"#\" style=\"color:#000000;\" onclick=\"alert('link-clicked');return false;\">");
                      builder.append(value);
                      builder.append("</a>");
                      return builder.toString();
                  }
              });
              ListGridField lgf2 = new ListGridField("value");
              lg.setDefaultFields(lgf1, lgf2);
              lg.addRowContextClickHandler(new RowContextClickHandler() {
                  @Override
                  public void onRowContextClick(RowContextClickEvent event) {
                      // Prevent default browser context menu.
                      event.cancel();
      
                      int colNum = event.getColNum();
                      if (colNum < 0) {
                          return;
                      }
      
                      int rowNum = event.getRowNum();
                      if (rowNum < 0) {
                          return;
                      }
      
                      ListGridField field = lg.getField(colNum);
                      if (field == null) {
                          return;
                      }
      
                      Boolean link = Boolean.valueOf(field.getAttribute("REFERENCE_LINK_ATTR"));
                      if (link.booleanValue()) {
                          t.setTitle("Counter: " + counter++);
      
                          // Ensure when right-clicking "link" formatted cell, the record is selected.
                          Record r = event.getRecord();
                          if ((r == null) || !((r instanceof ListGridRecord))) {
                              return;
                          } else if (!lg.isSelected((ListGridRecord) r)) {
                              lg.selectSingleRecord(r);
                          }
                      }
      
                      ListGridRecord[] selectedRecords = lg.getSelectedRecords();
                      if ((selectedRecords == null) || (selectedRecords.length == 0)) {
                          return;
                      } else if (selectedRecords.length == 1) {
                          int recordIndex = lg.getRecordIndex(selectedRecords[0]);
                          if (rowNum != recordIndex) {
                              return;
                          }
                      }
      
                      m.showContextMenu();
                  }
              });
      
              ListGridRecord r1 = new ListGridRecord();
              r1.setAttribute("name", "Name1");
              r1.setAttribute("value", "Value1");
              ListGridRecord r2 = new ListGridRecord();
              r2.setAttribute("name", "Name2");
              r2.setAttribute("value", "Value2");
              ListGridRecord r3 = new ListGridRecord();
              r3.setAttribute("name", "Name3");
              r3.setAttribute("value", "Value3");
              ListGridRecord r4 = new ListGridRecord();
              r4.setAttribute("name", "Name4");
              r4.setAttribute("value", "Value4");
              ListGridRecord[] rl = new ListGridRecord[] { r1, r2, r3, r4 };
              lg.setData(rl);
      
              t.setPane(lg);
              ts.addTab(t);
              ts.addTab(tOther);
              ts.show();
          }

      Comment


        #18
        SmartClient Version: SNAPSHOT_v10.1d_2015-10-07/Pro Deployment (built 2015-10-07)

        Comment


          #19
          Hi Isomorphic,

          Hopefully you have been able to reproduce it yourself with the new sample provided. There were a few questions you had that you might still want answered. Those answers can be found below.

          Is it IE-specific or visible cross browser?
          > It is IE-specific, I do not see this issue in the other browsers.

          Is it 100% reproducible or intermittent?
          > With the sample I provided you it was 100%.

          Any warnings in the dev console?
          > None that I saw.

          Regards

          Comment


            #20
            Hi Isomorphic,
            Wanted to follow up to make sure you were able to reproduce with the new sample and provided instructions.
            Regards

            Comment


              #21
              Actually no we are not reproducing it with IE9 or IE11.
              Can you confirm what version of IE you're seeing this on (and what OS)?

              Thanks

              Comment


                #22

                Comment


                  #23
                  Click image for larger version

Name:	winversion.jpg
Views:	145
Size:	8.9 KB
ID:	231983

                  Comment


                    #24
                    I am more than willing to set-up a go-to-meeting to demonstrate the issue "live" with someone from your team as this is currently blocking us. I assume you are using my last sample posted on 9th Oct 2015, 11:58?

                    Comment


                      #25
                      The first screenshot didn't come through - we see the second one [Windows 7 Professional (SP1)], but not the IE version...

                      A live demo might be something we'd consider if this ultimately proves impossible for us to repro outside your system, but it really goes above standard level support.
                      If we get to that stage, we'll contact you offline to discuss it, but if you can clarify the version of IE we'll take another look with your exact configuration, if possible.

                      --
                      Edit - and yes, we're using the most recent sample and instructions from this thread.

                      Comment


                        #26
                        Click image for larger version

Name:	ieversion.jpg
Views:	167
Size:	18.7 KB
ID:	231991

                        Comment


                          #27
                          I reposted it, can you see the IE version now?

                          Comment


                            #28
                            Yup. Thanks. We'll take a look.

                            Comment


                              #29
                              We have managed to reproduce the problem and see what's going on. We don't have a fix yet but we'll keep you posted as soon as we do

                              Regards
                              Isomorphic Software

                              Comment


                                #30
                                We've made a change to address this issue. Please try the next nightly 5.1d build, dated Oct 20 or above.

                                Regards
                                Isomorphic Software

                                Comment

                                Working...
                                X