Skip to content

www.dek-d.com - Placeholder is missing from the text box #28195

Open

Description

@cipriansv

URL: https://www.dek-d.com/activity/52318/

Browser / Version: Firefox Nightly 68.0a1 (2019-03-22)
Operating System: Windows 10 Pro
Tested Another Browser: Yes

Problem type: Design is broken
Description: Placeholder is missing from the text box
Steps to Reproduce:

  1. Navigate to: https://www.dek-d.com/activity/52318/
  2. Reach the text box from the bottom of the screen, next to the social media icons.
  3. Observe the text box placeholder.

Expected Behavior:
The placeholder must be displayed.

Actual Behavior:
The placeholder is missing.

Notes:

  1. The issue is not reproducible on Chrome 72.0.3626.121.
  2. Screenshot attached.

Watchers:
@softvision-oana-arbuzov
@softvision-sergiulogigan

sv;
Screenshot Description

Browser Configuration
  • None

From webcompat.com with ❤️

Activity

  1. added this to the needstriage milestone on Mar 22, 2019
  2. changed the title [-]www.dek-d.com - design is broken[/-] [+]www.dek-d.com - Placeholder is missing from the text box[/+] on Mar 22, 2019
  3. added
    severity-minor
    on Mar 22, 2019
  4. self-assigned this
    on Mar 25, 2019
  5. karlcow commented on Mar 25, 2019

    @karlcow
    Member

    The html code.

    <div class="input-wrapper -focus">
      <div spellcheck="true" data-medium-editor-element="true" class="medium-editor-element" role="textbox" aria-multiline="true" data-medium-editor-editor-index="1" medium-editor-index="30fe3cb2-71f0-b452-2ce5-42c7f1429cd6" data-placeholder="แสดงความคิดเห็นที่นี่..."
      data-medium-focused="true" contenteditable="true"></div>
      <a class="expand-button">
        <i class="icon fa fa-expand"></i>
      </a>
    </div>

    the placeholder text is inside data-placeholder instead of placeholder so it probably requires something else.

    in https://www0.dek-d.com/assets/topic/css/content-view.min.css?v=9.55

    .comment-container>.post-wrapper>.input-wrapper>.medium-editor-placeholder:after {
     position:absolute;
     left:0;
     top:0;
     content:attr(data-placeholder)!important;
     white-space:pre;
     cursor:text;
     padding:7px 10px;
     color:#a8a8a8
    }
    
    .input-wrapper>.medium-editor-placeholder:after {
     position:absolute;
     left:0;
     top:0;
     content:attr(data-placeholder)!important;
     white-space:pre;
     cursor:text;
     color:#a8a8a8
    }

    This is interesting because if I had manually the rules this is working.

    .medium-editor-element.medium-editor-placeholder-relative::after {
    
    	position: absolute;
    	left: 0;
    	top: 0;
    	content: attr(data-placeholder) !important;
    	white-space: pre;
    	cursor: text;
    	padding: 7px 10px;
    	color: #a8a8a8;
    }

    The class in chrome is

     class="medium-editor-element 
                 medium-editor-placeholder"
    

    The class in Firefox is

    class="medium-editor-element 
                medium-editor-placeholder-relative" 
    

    ok bingo. It took me too much time to find that the selectors were different.

    If I replace medium-editor-placeholder-relative by medium-editor-placeholder
    this is working as expected.

    So whatever sets the relative on this is the culprit.
    in https://www0.dek-d.com/assets/dist/article/js/main.js?v=9.55

    showPlaceholder: function (t) {
    t && (e.util.isFF && 0 === t.childNodes.length ? (t.classList.add('medium-editor-placeholder-relative'), t.classList.remove('medium-editor-placeholder'))  : (t.classList.add('medium-editor-placeholder'), t.classList.remove('medium-editor-placeholder-relative')))
    },
    hidePlaceholder: function (e) {
    e && (e.classList.remove('medium-editor-placeholder'), e.classList.remove('medium-editor-placeholder-relative'))
    },

    and this is user agent sniffing: isFF

    var a = {
      isIE: 'Microsoft Internet Explorer' === navigator.appName || 'Netscape' === navigator.appName && null !== new RegExp('Trident/.*rv:([0-9]{1,}[.0-9]{0,})').exec(navigator.userAgent),
      isEdge: null !== /Edge\/\d+/.exec(navigator.userAgent),
      isFF: navigator.userAgent.toLowerCase().indexOf('firefox') > - 1,
      isMac: t.navigator.platform.toUpperCase().indexOf('MAC') >= 0,
      keyCode: {
      BACKSPACE: 8,
      TAB: 9,
      ENTER: 13,
      ESCAPE: 27,
      SPACE: 32,
      DELETE: 46,
      K: 75,
      M: 77,
      V: 86
      },
    

    so either they remove the UA sniffing or they add a rule to cover Firefox in the CSS.

  6. added
    type-uaoverride
    type-css
    on Mar 25, 2019
  7. removed their assignment
    on Mar 25, 2019
  8. added
    engine-gecko
    on Apr 30, 2019
  9. added
    sci-exclude
    on Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    browser-firefoxengine-geckopriority-normalsci-excludeseverity-minortype-csstype-uaoverride

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions