ContextPopup: input type="button" popup open issue has been fixed
authorhjnim.kim <hjnim.kim@samsung.com>
Fri, 8 Feb 2013 04:57:52 +0000 (13:57 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 19 Feb 2013 07:58:43 +0000 (16:58 +0900)
input type="button" and div data-role="button" javascript open problem has been fixed
and support data-rel="back" method
DCM-542

Change-Id: I529495ebf9731877d6413ee494e7be78027e7192

demos/tizen-winsets/widgets/ctxpopup.html
libs/patch/0020-JQM-Apply-tizen-style-context-popup.patch

index 7d1873a..df9a00e 100644 (file)
@@ -142,6 +142,12 @@ Code Sample
 <div data-role="popup" id="positionOrigin" class="ui-content" data-theme="d">
        <p style="color:white">I am positioned over the origin.</p>
 </div>
+<br>
+<br>
+<input type="button" data-inline="true"  onclick="popupTest()" value="Open Popup - input type button"/>
+<br>
+<br>
+<div data-role="button" "button" data-inline="true"  onclick="popupTest()">Open Popup - div button</div>
 </div> <!-- /content -->
 
 <div data-role="footer">
index f8420c3..9388e28 100644 (file)
@@ -99,7 +99,7 @@ index c222f08..b46e737 100644
 +                                      break;
 +                              case 1:
 +                                      correctionValue = [ 0 , -(ret.y + menuSize.cy - linkOffset.top)];
-+                                      arrowtop = menuSize.cy - 1;
++                                      arrowtop = menuSize.cy - 2;
 +                                      arrowleft = (linkOffset.left - ret.x + correctionValue[0]) + ( $(this.link).width() / 2 ) - parseInt( $(this._ui.arrow).css("border-width") ) / 2;
 +                                      $(this._ui.arrow).attr( "class", "" )
 +                                                                      .addClass( "ui-arrow bottom" );
@@ -150,7 +150,7 @@ index c222f08..b46e737 100644
 +                              options = [];
 +                      }
 +                      if ( !options.link ) {
-+                              self.link = $(event.target).closest('a')[0];
++                              self.link = ( $(event.target).closest('a')[0] || $(event.target).closest('div')[0] );
 +                      } else {
 +                              self.link = options.link;
 +                      }