]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable: Fix CSP violation (style unsafe-inline)
authorJérémy Munsch <github@jeremydev.ovh>
Fri, 19 Jun 2020 06:45:00 +0000 (08:45 +0200)
committerFelix Nagel <fnagel@users.noreply.github.com>
Tue, 11 Aug 2020 21:43:45 +0000 (23:43 +0200)
ui/widgets/resizable.js

index cb0b1b11d0b40ef1554ef5e3590145575141dff1..222c93a5e011c2f62c962fe99d047b65972d929c 100644 (file)
@@ -116,7 +116,8 @@ $.widget( "ui.resizable", $.ui.mouse, {
                if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {
 
                        this.element.wrap(
-                               $( "<div class='ui-wrapper' style='overflow: hidden;'></div>" ).css( {
+                               $( "<div class='ui-wrapper'></div>" ).css( {
+                                       overflow: "hidden",
                                        position: this.element.css( "position" ),
                                        width: this.element.outerWidth(),
                                        height: this.element.outerHeight(),
@@ -718,7 +719,7 @@ $.widget( "ui.resizable", $.ui.mouse, {
 
                if ( this._helper ) {
 
-                       this.helper = this.helper || $( "<div style='overflow:hidden;'></div>" );
+                       this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );
 
                        this._addClass( this.helper, this._helper );
                        this.helper.css( {