Merge pull request #13693 from calixteman/textfields
XFA - Enable disabled fields (bug 1719464)
This commit is contained in:
		
						commit
						fbd2f28618
					
				@ -541,6 +541,8 @@ function fixTextIndent(styles) {
 | 
			
		||||
function setAccess(node, classNames) {
 | 
			
		||||
  switch (node.access) {
 | 
			
		||||
    case "nonInteractive":
 | 
			
		||||
      classNames.push("xfaNonInteractive");
 | 
			
		||||
      break;
 | 
			
		||||
    case "readOnly":
 | 
			
		||||
      classNames.push("xfaReadOnly");
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
@ -161,13 +161,24 @@ class XfaLayer {
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * TODO: re-enable that stuff once we've JS implementation.
 | 
			
		||||
     * See https://bugzilla.mozilla.org/show_bug.cgi?id=1719465.
 | 
			
		||||
     *
 | 
			
		||||
     * for (const el of rootDiv.querySelectorAll(
 | 
			
		||||
     * ".xfaDisabled input, .xfaDisabled textarea"
 | 
			
		||||
     * )) {
 | 
			
		||||
     * el.setAttribute("disabled", true);
 | 
			
		||||
     * }
 | 
			
		||||
     * for (const el of rootDiv.querySelectorAll(
 | 
			
		||||
     * ".xfaReadOnly input, .xfaReadOnly textarea"
 | 
			
		||||
     * )) {
 | 
			
		||||
     * el.setAttribute("readOnly", true);
 | 
			
		||||
     * }
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
    for (const el of rootDiv.querySelectorAll(
 | 
			
		||||
      ".xfaDisabled input, .xfaDisabled textarea"
 | 
			
		||||
    )) {
 | 
			
		||||
      el.setAttribute("disabled", true);
 | 
			
		||||
    }
 | 
			
		||||
    for (const el of rootDiv.querySelectorAll(
 | 
			
		||||
      ".xfaReadOnly input, .xfaReadOnly textarea"
 | 
			
		||||
      ".xfaNonInteractive input, .xfaNonInteractive textarea"
 | 
			
		||||
    )) {
 | 
			
		||||
      el.setAttribute("readOnly", true);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -254,6 +254,8 @@
 | 
			
		||||
  flex: 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.xfaNonInteractive input,
 | 
			
		||||
.xfaNonInteractive textarea,
 | 
			
		||||
.xfaDisabled input,
 | 
			
		||||
.xfaDisabled textarea,
 | 
			
		||||
.xfaReadOnly input,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user