LearnNewsExamplesServices
Frontmatter
id4892
titlecomponent.Base: getDomRect() => regression bug for arrays
stateClosed
labels
bug
assigneesExtAnimal
createdAtSep 11, 2023, 10:44 PM
updatedAtOct 2, 2023, 11:34 AM
githubUrlhttps://github.com/neomjs/neo/issues/4892
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 2, 2023, 11:34 AM

component.Base: getDomRect() => regression bug for arrays

Closed v8.1.0 bug
tobiu
tobiu commented on Sep 11, 2023, 10:44 PM

inside the old version, we were able to pass either an id, or an array of ids => getting an array of rects back.

    /**
     * Convenience shortcut
     * @param {String[]|String} id=this.id
     * @param {String} appName=this.appName
     * @returns {Promise<*>}
     */
    getDomRect(id=this.id, appName=this.appName) {
        return Neo.main.DomAccess.getBoundingClientRect({appName, id})
    }

the new version assumes that there will be just one rect, transforming it to a DOMRect => this breaks a lot of use cases. E.g.: horizontal scrolling inside component.DateSelector: https://github.com/neomjs/neo/blob/dev/src/component/DateSelector.mjs#L428

tobiu added the bug label on Sep 11, 2023, 10:44 PM
tobiu assigned to @ExtAnimal on Sep 11, 2023, 10:44 PM
ExtAnimal cross-referenced by PR #4894 on Sep 12, 2023, 10:40 AM
tobiu
tobiu Oct 2, 2023, 11:34 AM
tobiu closed this issue on Oct 2, 2023, 11:34 AM